diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-01-12 20:52:19 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-01-12 20:52:19 +0000 |
commit | 527071fb0dba0b8cae5ed8baa58b19ebf1996b89 (patch) | |
tree | 6ef99412b401e8e44a2875b1fd8ea22d50e1794d | |
parent | 658e0d82da9ff775e097dc712e851e5a2ec1e142 (diff) |
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9633 :
Do not try to add a new NAL unit when the previous one was not decoded
svn path=/trunk/; revision=54707
-rw-r--r-- | epan/dissectors/packet-h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-h264.c b/epan/dissectors/packet-h264.c index 74957f1c70..4ae8b2beb1 100644 --- a/epan/dissectors/packet-h264.c +++ b/epan/dissectors/packet-h264.c @@ -1458,7 +1458,7 @@ dissect_h264_seq_parameter_set_rbsp(proto_tree *tree, tvbuff_t *tvb, packet_info } } */ - proto_tree_add_expert(tree, pinfo, &ei_h264_undecoded, tvb, offset, -1); + proto_tree_add_expert(tree, pinfo, &ei_h264_undecoded, tvb, bit_offset>>3, -1); return -1; } @@ -1791,7 +1791,7 @@ startover: case H264_SEQ_PAR_SET: /* 7 Sequence parameter set*/ offset = dissect_h264_seq_parameter_set_rbsp(h264_nal_tree, tvb, pinfo, offset); /* A bit ugly */ - if (tvb_length_remaining(tvb, offset) > 0) { + if ((offset != -1) && (tvb_length_remaining(tvb, offset) > 0)) { /* In this case length = offset as we start from zero */ proto_item_set_len(item, offset/*Length */); item = proto_tree_add_item(tree, hf_h264_nal_unit, tvb, offset, -1, ENC_NA); |