aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isakmp.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-17 01:11:05 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-17 01:11:05 +0000
commit6be2c49d0989fc849470295bc7cc90d3432a9de9 (patch)
tree65ce99f459b07edf5c6e394013ffd3a593994f19 /epan/dissectors/packet-isakmp.c
parent26815dda85c561336fa1a0ffb1fa672298d1956d (diff)
Fix some Visual C++ static analyzer complaints.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35971 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r--epan/dissectors/packet-isakmp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 950f2ff42b..868e9f728e 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -1767,6 +1767,10 @@ decrypt_payload(tvbuff_t *tvb, packet_info *pinfo, const guint8 *buf, guint buf_
if (decr->secret_len < gcry_cipher_get_algo_keylen(gcry_cipher_algo))
return NULL;
cbc_block_size = (guint32) gcry_cipher_get_algo_blklen(gcry_cipher_algo);
+ if (cbc_block_size > MAX_DIGEST_SIZE) {
+ /* This shouldn't happen but we pass cbc_block_size to memcpy size below. */
+ return NULL;
+ }
switch(decr->hash_alg) {
case HMAC_MD5: