diff options
author | Dario Lombardo <lomato@gmail.com> | 2020-04-16 17:41:08 +0200 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-04-16 17:11:59 +0000 |
commit | 6d25a1062d092fdae62defeb7ed83a0807fe238a (patch) | |
tree | bc5e3b08e5d8b9857614305a615a2a72fcb7d35b /epan/addr_and_mask.c | |
parent | 251b16bb933a61b649eadff816bd48bccaa1b6cd (diff) |
epan: access a ws_in4_addr byte by byte.
Fixes a regression introduced by d3c4dfa9eed79d100f039f7042577cadb8fcad06.
It changed the type of the function, but not the way we access it. The
former code proceeded byte by byte, and we need to keep that behavior.
Bug: 16497
Change-Id: I02983635d7cf8e44a5631bf64d4a2854cb9c3bdb
Reviewed-on: https://code.wireshark.org/review/36858
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'epan/addr_and_mask.c')
-rw-r--r-- | epan/addr_and_mask.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/addr_and_mask.c b/epan/addr_and_mask.c index c730ba082a..d40e611643 100644 --- a/epan/addr_and_mask.c +++ b/epan/addr_and_mask.c @@ -56,7 +56,7 @@ tvb_get_ipv4_addr_with_prefix_len(tvbuff_t *tvb, int offset, ws_in4_addr *addr, *addr = 0; tvb_memcpy(tvb, addr, offset, addr_len); if (prefix_len % 8) - addr[addr_len - 1] &= ((0xff00 >> (prefix_len % 8)) & 0xff); + ((guint8*)addr)[addr_len - 1] &= ((0xff00 >> (prefix_len % 8)) & 0xff); return addr_len; } |