diff options
author | emanuele-f <faranda@ntop.org> | 2019-12-04 18:34:08 +0100 |
---|---|---|
committer | emanuele-f <faranda@ntop.org> | 2019-12-04 18:34:08 +0100 |
commit | 226a9abf2235fd9e87353ffe727babad71fb7274 (patch) | |
tree | 2bd41b665a744ac14653d0b6f795b2aeb74723b4 /src/lib/protocols/irc.c | |
parent | f26096ee4cf730244b3db577259f84b0cd37e521 (diff) |
Additional memory bounds checks
Diffstat (limited to 'src/lib/protocols/irc.c')
-rw-r--r-- | src/lib/protocols/irc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/irc.c b/src/lib/protocols/irc.c index 5ae0e34f7..37cfbe1ed 100644 --- a/src/lib/protocols/irc.c +++ b/src/lib/protocols/irc.c @@ -495,7 +495,7 @@ void ndpi_search_irc_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc packet->parsed_lines = 0; } for (i = 0; i < packet->parsed_lines; i++) { - if (packet->line[i].ptr[0] == ':') { + if ((packet->line[i].len > 0) && packet->line[i].ptr[0] == ':') { flow->l4.tcp.irc_3a_counter++; if (flow->l4.tcp.irc_3a_counter == 7) { /* ':' == 0x3a */ NDPI_LOG_INFO(ndpi_struct, "found irc. 0x3a. seven times."); |