diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-09-27 14:02:37 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-09-27 14:02:37 +0000 |
commit | d003cdf66e8d6a04ec501b100278e492e6c129e0 (patch) | |
tree | a141d4dc92058e3b4ba53ca8d30562bc34acfbcf /epan/dissectors/packet-image-jfif.c | |
parent | a23c3aae3c4e065aa6bbdb8458d24a2d1dc665dc (diff) |
Allow dissection of partial jpegs by a modification of the heuristics.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6230
#BACKPORT(1.8, 1.6)
svn path=/trunk/; revision=45174
Diffstat (limited to 'epan/dissectors/packet-image-jfif.c')
-rw-r--r-- | epan/dissectors/packet-image-jfif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-image-jfif.c b/epan/dissectors/packet-image-jfif.c index 582fefd79b..b1fdcba286 100644 --- a/epan/dissectors/packet-image-jfif.c +++ b/epan/dissectors/packet-image-jfif.c @@ -767,7 +767,7 @@ dissect_jfif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ return 0; if (tvb_get_ntohs(tvb, 0) != MARKER_SOI) return 0; - if (tvb_get_ntohs(tvb, tvb_len-2) != MARKER_EOI) + if (tvb_memeql(tvb, 6, "JFIF", 5)) return 0; /* Add summary to INFO column if it is enabled */ @@ -849,7 +849,7 @@ dissect_jfif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ } } - return offset; + return tvb_len; } static gboolean |