diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2016-05-29 16:35:22 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-11 17:24:22 +0000 |
commit | e00d73aaef49a8b1f1dd7b93a0244ada82728123 (patch) | |
tree | 3713e64fb04175d47c248172eec66e59502f8644 /epan/dissectors/packet-dcerpc-browser.c | |
parent | c755c887854b99a8748e14fadb3f3fa7abceb590 (diff) |
dcerpc-browser: don't THROW() an exception from a dissector
the condition for THROW() will never be true
there's no way to decrement offset below its initial value
the dissect_browser_TYPE_x_data() functions read a uint32 and increment
offset by 4 + the uint32 value that was read
Change-Id: Ia5a63e714ffa0add601960d858452152e4d9b10b
Reviewed-on: https://code.wireshark.org/review/15627
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dcerpc-browser.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc-browser.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/epan/dissectors/packet-dcerpc-browser.c b/epan/dissectors/packet-dcerpc-browser.c index 502274d6a5..0d690ace0f 100644 --- a/epan/dissectors/packet-dcerpc-browser.c +++ b/epan/dissectors/packet-dcerpc-browser.c @@ -90,7 +90,6 @@ dissect_browser_TYPE_4_data(tvbuff_t *tvb, int offset, dcerpc_info *di, guint8 *drep) { guint32 len; - int old_offset = offset; if(di->conformant_run){ /* this call is to make wireshark eat the array header for the conformant run */ @@ -104,8 +103,6 @@ dissect_browser_TYPE_4_data(tvbuff_t *tvb, int offset, proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len, ENC_NA); offset += len; - if (offset < old_offset) - THROW(ReportedBoundsError); return len; } @@ -137,7 +134,6 @@ dissect_browser_TYPE_3_data(tvbuff_t *tvb, int offset, dcerpc_info *di, guint8 *drep) { guint32 len; - int old_offset = offset; if(di->conformant_run){ /* this call is to make wireshark eat the array header for the conformant run */ @@ -152,8 +148,6 @@ dissect_browser_TYPE_3_data(tvbuff_t *tvb, int offset, proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len, ENC_NA); offset += len; - if (offset < old_offset) - THROW(ReportedBoundsError); return len; } @@ -741,7 +735,6 @@ dissect_browser_TYPE_9_data(tvbuff_t *tvb, int offset, dcerpc_info *di, guint8 *drep) { guint32 len; - int old_offset = offset; if(di->conformant_run){ /* this call is to make wireshark eat the array header for the conformant run */ @@ -757,8 +750,6 @@ dissect_browser_TYPE_9_data(tvbuff_t *tvb, int offset, proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len, ENC_NA); offset += len; - if (offset < old_offset) - THROW(ReportedBoundsError); return len; } @@ -931,7 +922,6 @@ dissect_browser_TYPE_12_data(tvbuff_t *tvb, int offset, dcerpc_info *di, guint8 *drep) { guint32 len; - int old_offset = offset; if(di->conformant_run){ /* this call is to make wireshark eat the array header for the conformant run */ @@ -947,8 +937,6 @@ dissect_browser_TYPE_12_data(tvbuff_t *tvb, int offset, proto_tree_add_item(tree, hf_browser_unknown_bytes, tvb, offset, len, ENC_NA); offset += len; - if (offset < old_offset) - THROW(ReportedBoundsError); return offset; } |