Reading past the end of a buffer is bad, Even if the
authorkrw <krw@openbsd.org>
Sat, 21 Jul 2018 15:24:55 +0000 (15:24 +0000)
committerkrw <krw@openbsd.org>
Sat, 21 Jul 2018 15:24:55 +0000 (15:24 +0000)
commit373f0df1f8c4f067f5a8ec780cd0c302831f1764
tree5e6c6ddbb740519f79d869bd5414d04241f6d00a
parenta055e56fcd5d77d5d43ca56c977e8f51d57edac4
Reading past the end of a buffer is bad, Even if the
extra byte is always there. Even if the byte contains
innocuous data that isn't used. Eeven if a particular
level of optimization of a particular compiler avoids
it by processing things backwards. Bad.

So simplify and correct logic. Perhaps even proof the
code against future generations of clever compilers.

Pointed out by Brandon Falk. Thanks!

ok millert@ tb@
sbin/dhclient/options.c