diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-03-25 21:19:18 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-03-25 21:19:18 +0000 |
commit | bb8006d371831cf9fc50a397172ea5cbdb9e2afa (patch) | |
tree | 5c9051f9252d4e123d9ecf0fe15ed803c4f98528 /epan/dissectors/packet-ipsec.c | |
parent | f981bb3341a39730505eaa759258d0a04d90d3d4 (diff) |
bugfix: prevent a negative length, if ah.ah_len is zero
svn path=/trunk/; revision=13902
Diffstat (limited to 'epan/dissectors/packet-ipsec.c')
-rw-r--r-- | epan/dissectors/packet-ipsec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index 15abeed0cc..2b29bd9c3c 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -166,7 +166,7 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offsetof(struct newah, ah_seq), 4, (guint32)g_ntohl(ah.ah_seq)); proto_tree_add_text(ah_tree, tvb, - sizeof(ah), (ah.ah_len - 1) << 2, + sizeof(ah), (ah.ah_len) ? (ah.ah_len - 1) << 2 : 0, "ICV"); if (next_tree_p != NULL) { |