summaryrefslogtreecommitdiff
path: root/asn1/snmp
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2012-08-01 02:08:29 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2012-08-01 02:08:29 +0000
commitc38a247faab3f7b39cfe0c3c16ec35d64f6db19d (patch)
tree30458ee6eaff09d44c983dd1d6c1259b94eccf61 /asn1/snmp
parentdd6ca38ffff60ed9069ff23b77b0daf1926c2ddd (diff)
downloadwireshark-c38a247faab3f7b39cfe0c3c16ec35d64f6db19d.tar.gz
Fix Coverity CID 280019 (formerly 19): "Logically dead code" that abroman previously commited a fix for in r17532, but forgot to also commit a change to asn1/snmp/packet-snmp-template.c as well, so the change was apparently inadvertently reverted the next time that packet-snmp.c was regenerated.
svn path=/trunk/; revision=44179
Diffstat (limited to 'asn1/snmp')
-rw-r--r--asn1/snmp/packet-snmp-template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 090ab7a2d0..8379159616 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -990,7 +990,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
int len_remain = len;
/* first bit: engine id conformance */
- if (len_remain<4) return offset;
+ if (len_remain<1) return offset;
conformance = ((tvb_get_guint8(tvb, offset)>>7) & 0x01);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, ENC_BIG_ENDIAN);