Merge pull request #442 from vel21ripn/2.0-stable
The bug in the function ndpi_parse_packet_line_info().
This commit is contained in:
+1
-1
@@ -3753,7 +3753,7 @@ void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_struc
|
||||
packet->line[packet->parsed_lines].ptr = packet->payload;
|
||||
packet->line[packet->parsed_lines].len = 0;
|
||||
|
||||
for(a = 0; a < end-1 /* This because get_u_int16_t(packet->payload, a) reads 2 bytes */; a++) {
|
||||
for(a = 0; a <= end-1 /* This because get_u_int16_t(packet->payload, a) reads 2 bytes */; a++) {
|
||||
if(get_u_int16_t(packet->payload, a) == ntohs(0x0d0a)) {
|
||||
packet->line[packet->parsed_lines].len = (u_int16_t)(((unsigned long) &packet->payload[a]) - ((unsigned long) packet->line[packet->parsed_lines].ptr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user