diff options
author | Darryl Sokoloski <darryl@sokoloski.ca> | 2018-09-11 17:16:12 -0400 |
---|---|---|
committer | Darryl Sokoloski <darryl@sokoloski.ca> | 2018-09-11 17:16:12 -0400 |
commit | c0ed50d5b002838ded46ee22852404998389f9b7 (patch) | |
tree | e06c2d4f2c1567231ce52ca08db5b7a8dedb0202 /src/lib/protocols/openvpn.c | |
parent | adcb82d2b528a24d834c6b9ebb183a7261401afd (diff) |
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/openvpn.c')
0 files changed, 0 insertions, 0 deletions