summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2016-10-05 21:07:19 +0900
committerHugo Benichi <hugobenichi@google.com>2016-10-06 21:22:29 +0900
commit006e0613016c1a0e0627f992f5a93a7b7198edba (patch)
treeaa2329c916434a0c350870c938952c1d61554d27 /tools/aapt2/java/JavaClassGenerator.cpp
parente0ea7fecd63002ac2d3df18490fd1c16578d1935 (diff)
Reject DHCP packets with no magic cookie
This patch adds an explicit check in the DHCP packet parser for rejecting packets without a magic cookie, instead of relying on the top-level try-catch-all in the parser. This allows to add to DHCP error metrics this specific error. It also allows to add two poor man's fuzzing tests that tries to find additional gaps in the DHCP packet parser by - trying to parse all subslices of a valid offer packet. - trying to parse random byte arrays. Test: covered by previously introduced malformed DHCP packet unit tests + additional fuzzing tests. Bug: 31850211 Change-Id: If53c9ba9df78d7604ec018c9d67c237ae59c4833
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions