aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-coap.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-10-05 21:00:25 +0000
committerEvan Huus <eapache@gmail.com>2013-10-05 21:00:25 +0000
commit5c1eafd595cf68dddb68e9829c32f2f250043e57 (patch)
treec2d184c9e6500d5ffd6b153033842682d907f31c /epan/dissectors/packet-coap.c
parenteb1ee413e3ff2328e8ef41b4d14ab1ef98fa81d9 (diff)
From Peter A. Bigot via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9225
Fix CoAP option decoding. It's perfectly acceptable for the Payload Marker to appear with no preceding options. Without this check such a situation produces an invalid diagnostic: end-of-options marker found, but option length isn't 15 svn path=/trunk/; revision=52383
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r--epan/dissectors/packet-coap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index 70ff7da7d5..5c0ced7139 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -540,6 +540,8 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr
char strbuf[56];
opt_jump = tvb_get_guint8(tvb, offset);
+ if (0xff == opt_jump)
+ return offset;
offset++;
/*