aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-06-18 17:09:54 +0000
committerGerald Combs <gerald@wireshark.org>2012-06-18 17:09:54 +0000
commit4945ce61ef7fba18061c6a05aa7f3704ca53b6a9 (patch)
treed2ca2e44dab9320482e4dc058aada9ab7507885c /epan
parent697cc92c864477bbfc424fba26360eb4c29a0919 (diff)
Fix a null pointer warning from Clang. Not sure if we'll run into this
in practice. svn path=/trunk/; revision=43334
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ssl-utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 8e705f60c1..5bab348b05 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -1916,7 +1916,7 @@ static gint prf(SslDecryptSession* ssl,StringInfo* secret,gchar* usage,StringInf
gint ret;
if (ssl->version_netorder==SSLV3_VERSION){
ret = ssl3_prf(secret,usage,rnd1,rnd2,out);
- }else if (ssl->version_netorder==TLSV1_VERSION || ssl->version_netorder==TLSV1DOT1_VERSION ||
+ }else if (ssl->version_netorder==TLSV1_VERSION || ssl->version_netorder==TLSV1DOT1_VERSION ||
ssl->version_netorder==DTLSV1DOT0_VERSION || ssl->version_netorder==DTLSV1DOT2_VERSION ||
ssl->version_netorder==DTLSV1DOT0_VERSION_NOT){
ret = tls_prf(secret,usage,rnd1,rnd2,out);
@@ -3026,6 +3026,10 @@ ssl_find_private_key(SslDecryptSession *ssl_session, GHashTable *key_hash, GTree
guint32 port = 0;
Ssl_private_key_t * private_key;
+ if (!ssl_session) {
+ return 0;
+ }
+
/* we need to know which side of the conversation is speaking */
if (ssl_packet_from_server(ssl_session, associations, pinfo)) {
dummy.addr = pinfo->src;