diff options
author | Luca Deri <deri@ntop.org> | 2025-05-26 12:25:55 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2025-05-26 12:25:55 +0200 |
commit | 3e3cef6213edc47a89ebab8c51e5244ebb13cec1 (patch) | |
tree | 64332d96b76b3619d9dd60186d141c178a500d48 /src/lib | |
parent | 03e1e593d137eebf94c0741b12178c528ee950e3 (diff) |
Fingerprint fixes
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 6adebf900..f9c97f216 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7241,7 +7241,7 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str, } else if(ndpi_str->cfg.tcp_fingerprint_format == NDPI_MUONFP_TCP_FINGERPRINT) { rc = snprintf(&fingerprint[fp_idx], sizeof(fingerprint)-fp_idx, "%s%u", (i > 0) ? "-" : "", kind); - if((rc < 0) || ((int)(fp_idx + rc) == sizeof(options_fp))) + if((rc < 0) || ((int)(fp_idx + rc) == sizeof(fingerprint))) break; fp_idx += rc; @@ -7305,7 +7305,8 @@ static int ndpi_init_packet(struct ndpi_detection_module_struct *ndpi_str, } i += len; - } + } else + break; } /* for */ } |