Minor warning fixes

This commit is contained in:
Luca Deri
2023-09-05 18:08:16 +02:00
parent 978df906b3
commit ad9ed4f954
4 changed files with 24 additions and 8 deletions
+3 -1
View File
@@ -1274,7 +1274,9 @@ int ndpi_dpi2json(struct ndpi_detection_module_struct *ndpi_struct,
char bittorent_hash[sizeof(flow->protos.bittorrent.hash)*2+1];
for(i=0, j = 0; j < sizeof(bittorent_hash)-1; i++) {
sprintf(&bittorent_hash[j], "%02x",
snprintf(&bittorent_hash[j],
sizeof(bittorent_hash) - j,
"%02x",
flow->protos.bittorrent.hash[i]);
j += 2, n += flow->protos.bittorrent.hash[i];