[PATCH] UPSTREAM: Zero length embedded option

Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-UPSTREAM-Zero-Length-
Embedded-Option.patch.

When we have a zero length for an embedded option, warn if any
more data or not the last option and return the number of
currently processed options. This fixes a potential buffer
overrun for options where the last embedded optional is an
optional string. Thanks to Paul Stewart @ Chromium for the fix.

http://roy.marples.name/projects/dhcpcd/ci/732e88eaa0?sbs=0

BUG: 22956197
Change-Id: I0291624e28fcec8f4d6f3affeb8fec1fff332f19

Reviewed-on: https://chromium-review.googlesource.com/281000
1 file changed