Warning fix

This commit is contained in:
Luca Deri
2020-04-22 18:52:36 +02:00
parent 473a5d1d0b
commit 0b702c20d3
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
/* The check "len > sizeof(dNSName) - 1" will be always false. If we add it, /* The check "len > sizeof(dNSName) - 1" will be always false. If we add it,
the compiler is smart enough to detect it and throws a warning */ the compiler is smart enough to detect it and throws a warning */
if((len == 0 /* Looks something went wrong */)) if(len == 0 /* Looks something went wrong */)
break; break;
strncpy(dNSName, (const char*)&packet->payload[i], len); strncpy(dNSName, (const char*)&packet->payload[i], len);