diff options
Prevent invalid reads past end-of-buffer.
The recent revert commit applied to ndpi_parse_packet_line_info resurrects an old bug where the last lines in packets that end with a CR+NL will not be parsed. This revert commit is an attempt to prevent invalid reads past the end of the packet buffer. This PR moves the end-of-bounds test to before the 16-bit read and returns if true. This fixes the case where a text line ends aligned to the buffer-end boundary, and it fixes the invalid read issue.
Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
Diffstat (limited to 'src/lib/protocols/memcached.c')
0 files changed, 0 insertions, 0 deletions