diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-03-08 10:53:12 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-03-08 10:53:12 +0000 |
commit | 6007c314029f9d3808f4ae55412631599990978e (patch) | |
tree | ef71dababdf99c89a397a9520e553eb1895b78ae /epan/dissectors/packet-ssl-utils.c | |
parent | b1a11016ec774ddad96f4182abaeba3da5b5841b (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.c | 5 |
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; } |