TLS: fix a memory error in JA3 code (#1227)
protocols/tls.c:1856:5: runtime error: index 256 out of bounds for type 'char [256]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior protocols/tls.c:1856:5
This commit is contained in:
@@ -1849,7 +1849,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
duplicate_found);
|
duplicate_found);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (i == tot_signature_algorithms_len) {
|
if (i >= tot_signature_algorithms_len) {
|
||||||
ja3.client.signature_algorithms[i*2 - 1] = '\0';
|
ja3.client.signature_algorithms[i*2 - 1] = '\0';
|
||||||
} else {
|
} else {
|
||||||
ja3.client.signature_algorithms[i*2] = '\0';
|
ja3.client.signature_algorithms[i*2] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user