From 7dd4dafae93c8560cb3e2dd78b9806f36f3ee0ca Mon Sep 17 00:00:00 2001 From: Matej Pristak Date: Thu, 6 Mar 2014 23:10:42 +0100 Subject: When working with packets with variable length (defined with -1 length) in HPM, we are leaving these in stack when the size of packet exceeds declared size due to this line. This was probably meant as if( packet_declared_size > packet_actual_size ) do_not_parse_it_yet, but was doing the opposite. --- src/common/HPM.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 src/common/HPM.c (limited to 'src') diff --git a/src/common/HPM.c b/src/common/HPM.c old mode 100644 new mode 100755 index bd2ce93ab..a25a17782 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -512,7 +512,7 @@ unsigned char hplugins_parse_packets(int fd, enum HPluginPacketHookingPoints poi short length; if( (length = packet->len) == -1 ) { - if( (length = RFIFOW(fd, 2)) < (int)RFIFOREST(fd) ) + if( (length = RFIFOW(fd, 2)) > (int)RFIFOREST(fd) ) return 2; } -- cgit v1.2.3-60-g2f50