diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-03 18:48:29 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-03 18:48:29 +0000 |
commit | d1df0f913078d129e1d4ebe49f3704a3945742f6 (patch) | |
tree | 09801e16ad55e21c3b0352202ab56b00e02ab7ef /epan/dissectors/packet-btsdp.c | |
parent | 1acf19f7ebd8fe7036b3453b0576dd9b1e2d9008 (diff) |
Fix (or at least quiet Valgrind about) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5542 :
Always initialize *all* the outputs of get_sdp_type().
svn path=/trunk/; revision=35347
Diffstat (limited to 'epan/dissectors/packet-btsdp.c')
-rw-r--r-- | epan/dissectors/packet-btsdp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index 59048f05fb..0a8c459c39 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -265,6 +265,11 @@ get_sdp_type(tvbuff_t *tvb, int offset, guint16 id, guint8 *type, guint8 **val, *type = (byte0>>3) & 0x1f; size_index = byte0 & 0x07; + /* Initialize the rest of the outputs */ + *val = NULL; + *service = 0; + *service_val = 0; + start_offset=offset; offset = get_type_length(tvb, offset, &size); type_size = offset - start_offset + size; @@ -364,8 +369,6 @@ get_sdp_type(tvbuff_t *tvb, int offset, guint16 id, guint8 *type, guint8 **val, } break; } - default: - *val = NULL; } return type_size; @@ -582,7 +585,7 @@ dissect_sdp_service_attribute(proto_tree *tree, tvbuff_t *tvb, int offset, packe tap_queue_packet(btsdp_tap, NULL, (void *) service_item); } } - } + } proto_item_set_len(ti_sa, size + 3); proto_item_set_len(ti_av, size); |