diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-04-30 15:57:05 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-04-30 15:57:05 +0000 |
commit | d27b5bd9ba96b12d3183181b4a9a5b5beb1b1815 (patch) | |
tree | 4fb589a069dea533787fad8096210432bd0decf0 /asn1/mpeg-pes | |
parent | d75f0bc4aa3513b3e3af2e4aca70a3b2fdd7d56e (diff) |
Fix:
"This is due to a bug in the sourcecode of the MPEG-PES dissector. It originates in r26328, which added a bugfix to the generated code with the use of 'illegal'
characters in the comment block.
Currently the bugfix is dropped since it was never added to the ASN.1 dissector template, hence has been lost with the new generation of this code."
svn path=/trunk/; revision=28201
Diffstat (limited to 'asn1/mpeg-pes')
-rw-r--r-- | asn1/mpeg-pes/Makefile.nmake | 4 | ||||
-rw-r--r-- | asn1/mpeg-pes/packet-mpeg-pes-template.c | 21 |
2 files changed, 23 insertions, 2 deletions
diff --git a/asn1/mpeg-pes/Makefile.nmake b/asn1/mpeg-pes/Makefile.nmake index 5a32997c60..6aa21c4986 100644 --- a/asn1/mpeg-pes/Makefile.nmake +++ b/asn1/mpeg-pes/Makefile.nmake @@ -27,3 +27,7 @@ include ../Makefile.preinc.nmake include Makefile.common include ../Makefile.inc.nmake +checkapi: + $(PERL) ../../tools/checkAPIs.pl \ + $(PROTOCOL_NAME).cnf \ + packet-$(PROTOCOL_NAME)-template.c
\ No newline at end of file diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c index d9bb6e3c6f..91bf85ced3 100644 --- a/asn1/mpeg-pes/packet-mpeg-pes-template.c +++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c @@ -407,7 +407,15 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset = dissect_mpeg_pes_Stream(tvb, offset, &asn1_ctx, tree, hf_mpeg_pes_extension); - length -= 5 * 8; + /* https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2229 + * A value of 0 indicates that the PES packet length is neither specified nor + * bounded and is allowed only in PES packets whose payload is a video elementary + * stream contained in Transport Stream packets. + * XXX Some one with access to the spec should check this + */ + if(length !=0 && stream != STREAM_VIDEO){ + length -= 5 * 8; + } header_length = tvb_get_guint8(tvb, 8); if (header_length > 0) { @@ -416,7 +424,16 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) header_length, header_length); dissect_mpeg_pes_header_data(header_data, pinfo, tree, flags); offset += header_length * 8; - length -= header_length * 8; + /* lenght may be zero for Video stream */ + if(length !=0 && stream != STREAM_VIDEO){ + length -= header_length * 8; + } + } + + /* lenght may be zero for Video stream */ + if(length==0){ + proto_tree_add_item(tree, hf_mpeg_pes_data, tvb, (offset>>3),-1, FALSE); + return TRUE; } es = tvb_new_subset(tvb, offset / 8, -1, length / 8); |