Fixed Git protocol dissection (#1355)

This commit is contained in:
Luca Deri
2021-10-25 18:52:27 +02:00
parent b6d9536533
commit 5ccc61d1cb
+2 -2
View File
@@ -47,8 +47,8 @@ void ndpi_search_git(struct ndpi_detection_module_struct *ndpi_struct,
u_int32_t git_pkt_len;
memcpy(&len, &pp[offset], 4), len[4] = 0;
git_pkt_len = atoi(len);
sscanf(len, "%x", &git_pkt_len);
if((payload_len < git_pkt_len) || (git_pkt_len == 0 /* Bad */)) {
found_git = 0;
break;