diff options
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index c6aec46e7..a99f6530d 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -8698,6 +8698,13 @@ static void parse_single_packet_line(struct ndpi_detection_module_struct *ndpi_s if(h->line->len == 0) h->line->ptr = NULL; + /* Stripping trailing spaces */ + while(h->line->len > 0 && h->line->ptr[h->line->len - 1] == ' ') { + h->line->len--; + } + if(h->line->len == 0) + h->line->ptr = NULL; + break; } } |