Fix dissection of IPv4 header (#1561)

See: https://github.com/ntop/nDPI/runs/6643914510?check_suite_focus=true

Convert al the `MIN(a,b)` calls to `ndpi_min(a,b)`
This commit is contained in:
Ivan Nardi
2022-05-29 22:39:48 +02:00
committed by GitHub
parent 9c1a53f39f
commit a9d7cc4841
4 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -2200,10 +2200,10 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
} else {
u_int16_t seq_len = ntohs(*((u_int16_t*)&packet->payload[s_offset]));
s_offset += 2;
final_offset = MIN(total_len, s_offset + seq_len);
final_offset = ndpi_min(total_len, s_offset + seq_len);
}
} else {
final_offset = MIN(total_len, s_offset + extension_len);
final_offset = ndpi_min(total_len, s_offset + extension_len);
}
while(s_offset < final_offset) {