Check to avoid allocating twice the esni memory
This commit is contained in:
@@ -1288,6 +1288,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
printf("Client SSL [Encrypted Server Name len: %u]\n", e_sni_len);
|
||||
#endif
|
||||
|
||||
if(flow->protos.stun_ssl.ssl.encrypted_sni.esni == NULL) {
|
||||
flow->protos.stun_ssl.ssl.encrypted_sni.esni = (char*)ndpi_malloc(e_sni_len*2+1);
|
||||
|
||||
if(flow->protos.stun_ssl.ssl.encrypted_sni.esni) {
|
||||
@@ -1307,6 +1308,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension_offset += extension_len; /* Move to the next extension */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user