mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-12 18:36:35 -04:00
LZO compression buffer overflow errors will now invalidate
the packet rather than trigger a fatal assertion. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3221 e7ae566f-a301-0410-adde-c780ea21d3b5
This commit is contained in:
parent
c282a2c296
commit
e1cf60c56f
1 changed files with 7 additions and 1 deletions
8
lzo.c
8
lzo.c
|
|
@ -156,7 +156,13 @@ lzo_compress (struct buffer *buf, struct buffer work,
|
|||
{
|
||||
ASSERT (buf_init (&work, FRAME_HEADROOM (frame)));
|
||||
ASSERT (buf_safe (&work, LZO_EXTRA_BUFFER (PAYLOAD_SIZE (frame))));
|
||||
ASSERT (buf->len <= PAYLOAD_SIZE (frame));
|
||||
|
||||
if (!(buf->len <= PAYLOAD_SIZE (frame)))
|
||||
{
|
||||
dmsg (D_COMP_ERRORS, "LZO compression buffer overflow");
|
||||
buf->len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
err = LZO_COMPRESS (BPTR (buf), BLEN (buf), BPTR (&work), &zlen, lzowork->wmem);
|
||||
if (err != LZO_E_OK)
|
||||
|
|
|
|||
Loading…
Reference in a new issue