diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2021-09-13 18:24:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 18:24:42 +0200 |
commit | 17774bf09c2be9bc24948fd8a19c0e3624cba16f (patch) | |
tree | 24226b409a3814d6574e777bacc7c837245933e0 /src/lib | |
parent | 22241a1d36391ef4a7825aec0b1fb215bb2f095d (diff) |
Bittorrent: fix a potential use-of-uninitialized-value error (#1296)
Not sure if this is the right fix (from a logical point-of-view): this
code hasn't changed since OpenDPI era (!) and I have't found a trace
triggering this code path.
Anyway, the use-of-uninitialized-value error itself should be fixed.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/protocols/bittorrent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index 55e9b3173..9e660c13a 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -163,7 +163,7 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module } /* this is a self built client, not possible to catch asymmetrically */ - if((packet->parsed_lines == 10 || (packet->parsed_lines == 11 && packet->line[11].len == 0)) + if((packet->parsed_lines == 10 || (packet->parsed_lines == 11 && packet->line[10].len == 0)) && packet->user_agent_line.ptr != NULL && packet->user_agent_line.len > 12 && memcmp(packet->user_agent_line.ptr, "Mozilla/4.0 ", |