addr_resolv: fix crashes in parse_ether_address_fast
authorPeter Wu <peter@lekensteyn.nl>
Thu, 22 Nov 2018 20:03:18 +0000 (21:03 +0100)
committerAnders Broman <a.broman58@gmail.com>
Fri, 23 Nov 2018 04:10:04 +0000 (04:10 +0000)
commitc344d454b45b8a6f4ddf84c5e5d1164bb5647374
tree59db459540bc3f8133d9e3dad68c3c82804c2d33
parent802d4c0121bff6ce0cb38dd15e20fa3238da183a
addr_resolv: fix crashes in parse_ether_address_fast

When no mask is allowed, reject addresses like "aa:bb:cc:...".
Fix the type of 'cp' to avoid reading from a negative array index.
Fix parsing, a nibble is four bits, not eight.

Bug: 15297
Change-Id: Ibb0d0c17005b1e6213c09092e4b3c888a9024304
Fixes: v2.9.0rc0-2629-g3bb32ede26 ("addr_resolv: add fast path for parsing addresses from manuf")
Reviewed-on: https://code.wireshark.org/review/30768
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/addr_resolv.c