aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ssl-utils.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-03-08 10:53:12 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-03-08 10:53:12 +0000
commit6007c314029f9d3808f4ae55412631599990978e (patch)
treeef71dababdf99c89a397a9520e553eb1895b78ae /epan/dissectors/packet-ssl-utils.c
parentb1a11016ec774ddad96f4182abaeba3da5b5841b (diff)
Avoid passing junk to ssl_debug_printf fmt if a weird cipher is found ().
FIxes Coverity's run 14 CID 81 svn path=/trunk/; revision=17525
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r--epan/dissectors/packet-ssl-utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 49e31c0427..65c350d946 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -342,7 +342,8 @@ static const char *ciphers[]={
"RC2",
"IDEA",
"AES",
- "AES256"
+ "AES256",
+ "*UNKNOWN*"
};
/* look in openssl/ssl/ssl_lib.c for a complete list of available cipersuite*/
@@ -591,7 +592,7 @@ ssl_create_decoder(SslDecoder *dec, SslCipherSuite *cipher_suite,
}
if (ciph == 0) {
ssl_debug_printf("ssl_create_decoder can't find cipher %s\n",
- ciphers[cipher_suite->enc-0x30]);
+ ciphers[(cipher_suite->enc-0x30) > 7 ? 7 : (cipher_suite->enc-0x30)]);
return -1;
}