diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-02-04 15:57:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 15:57:17 +0100 |
commit | 79968f3245ae7bf277e01d8c5a28349b75d9ac74 (patch) | |
tree | 38487aabe2cbd037bb288cb2dbd832a4174075eb /src/lib | |
parent | f5035521e8beadd228a304fd8707ba798bc850d2 (diff) |
Sync utests (#1433)
* Sync utest results
* Fix read-heap-buffer-overflow error reported by CI
See: https://github.com/ntop/nDPI/runs/5055876515?check_suite_focus=true
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index d14c8086b..35a4091fc 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6096,6 +6096,8 @@ void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_str, while((packet->authorization_line.len > 0) && (packet->authorization_line.ptr[0] == ' ')) packet->authorization_line.len--, packet->authorization_line.ptr++; + if(packet->authorization_line.len == 0) + packet->authorization_line.ptr = NULL; packet->http_num_headers++; } else @@ -6207,6 +6209,8 @@ void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_str, while((packet->content_line.len > 0) && (packet->content_line.ptr[0] == ' ')) packet->content_line.len--, packet->content_line.ptr++; + if(packet->content_line.len == 0) + packet->content_line.ptr = NULL;; packet->http_num_headers++; } else |