aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-idrp.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-12-07 14:36:54 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-12-07 14:36:54 +0000
commitcff7d45f852fd53fc5b55f0aa743414f6c5d4d15 (patch)
tree32291487845d4078edb8eed2c1e71f089bc74e98 /epan/dissectors/packet-idrp.c
parent1560949e4db1418405de5ecaaa36e0e3be79bcb8 (diff)
From Mathias Guettler via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9523 :
Fix ISO 10747 (IDRP) incorrect handling of data in IDRP ERROR PDU's svn path=/trunk/; revision=53824
Diffstat (limited to 'epan/dissectors/packet-idrp.c')
-rw-r--r--epan/dissectors/packet-idrp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-idrp.c b/epan/dissectors/packet-idrp.c
index a4cb8f2560..228b77ebae 100644
--- a/epan/dissectors/packet-idrp.c
+++ b/epan/dissectors/packet-idrp.c
@@ -977,8 +977,7 @@ static int dissect_BISPDU_ERROR(tvbuff_t * tvb, int offset, proto_tree * tree)
for the IDRP ERROR PDU. The contents of the Data field depends upon the
error code and error subcode. */
data_length = tvb_reported_length_remaining(tvb, offset);
- if (data_length>=0) {
- offset++;
+ if (data_length>0) {
proto_tree_add_item(tree, hf_idrp_error_data, tvb, offset, data_length,
ENC_ASCII | ENC_NA);
offset += data_length;