Wireshark-commits: [Wireshark-commits] master c7d67d8: Add some more checks, clean up length handli
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c7d67d8ff5d799f49b83d54b0dfeb0a23618bbf1
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
c7d67d8 by Guy Harris (guy@xxxxxxxxxxxx):
Add some more checks, clean up length handling.
Check for destination or source MAC addresses that aren't 12 characters
(hex dump of 6 octets) long and type/length fields that aren't 4
characters (hex dump of 2 octets) long.
The buffer into which we copy the hex dump characters doesn't need to be
null-terminated, so don't bother to null-terminate it. Use the final
offset into the buffer as the buffer length, rather than using strlen().
Just memcpy the MAC addresses and type/length fields into the buffer;
the buffer is guaranteed to be big enough for all of them, and, as
noted, it doesn't need to be null-terminated.
Change-Id: I790e953542ae8443af01c81229a8deb877448ee3
Reviewed-on: https://code.wireshark.org/review/15239
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 6332c2f Don't assume packets will be no larger than ISERIES_MAX_PACKET_LEN.
adds c7d67d8 Add some more checks, clean up length handling.
Summary of changes:
wiretap/iseries.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 6 deletions(-)