Add length check before checking a Tor certificate name
This commit is contained in:
@@ -31,7 +31,7 @@ int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
len = strlen(certificate);
|
len = strlen(certificate);
|
||||||
|
|
||||||
/* Check if it ends in .com or .net */
|
/* Check if it ends in .com or .net */
|
||||||
if(strcmp(&certificate[len-4], ".com") && strcmp(&certificate[len-4], ".net"))
|
if(len>=4 && strcmp(&certificate[len-4], ".com") && strcmp(&certificate[len-4], ".net"))
|
||||||
return(0);
|
return(0);
|
||||||
|
|
||||||
if((len < 6)
|
if((len < 6)
|
||||||
|
|||||||
Reference in New Issue
Block a user