If setting an address from a tvb and the address length is 0, the address should be NULL.
Bug: 12295 Change-Id: I875308a16b11023a691d34057c7f8561a15aa598 Reviewed-on: https://code.wireshark.org/review/14649 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
1459b9bee3
commit
2e6b7c5abb
|
@ -116,7 +116,10 @@ static inline void
|
|||
set_address_tvb(address *addr, int addr_type, int addr_len, tvbuff_t *tvb, int offset) {
|
||||
const void *p;
|
||||
|
||||
p = tvb_get_ptr(tvb, offset, addr_len);
|
||||
if (addr_len != 0)
|
||||
p = tvb_get_ptr(tvb, offset, addr_len);
|
||||
else
|
||||
p = NULL;
|
||||
set_address(addr, addr_type, addr_len, p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue