diff options
author | Luca Deri <deri@ntop.org> | 2020-08-31 17:23:00 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-08-31 17:23:00 +0200 |
commit | 8575a071133ef312686cbeb88daf6e5fdb38bb7c (patch) | |
tree | fa3c05e8ab33c26359bbd4fd4db3a3d232fffda0 | |
parent | 460ff3c7aba42d0e7b99a227e0cb846af296e4e0 (diff) |
Added check for ndpi_ssl_version2str()
-rw-r--r-- | src/lib/ndpi_utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 5cd351ba9..cd72bf4f3 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -716,7 +716,9 @@ int ndpi_has_human_readeable_string(struct ndpi_detection_module_struct *ndpi_st char* ndpi_ssl_version2str(struct ndpi_flow_struct *flow, u_int16_t version, u_int8_t *unknown_tls_version) { - *unknown_tls_version = 0; + + if(unknown_tls_version) + *unknown_tls_version = 0; switch(version) { case 0x0300: return("SSLv3"); @@ -748,7 +750,8 @@ char* ndpi_ssl_version2str(struct ndpi_flow_struct *flow, if((version >= 0x7f00) && (version <= 0x7fff)) return("TLSv1.3 (draft)"); - *unknown_tls_version = 1; + if(unknown_tls_version) + *unknown_tls_version = 1; if(flow != NULL) { snprintf(flow->protos.stun_ssl.ssl.ssl_version_str, |