]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PPP]: Fix output buffer size in ppp_decompress_frame().
authorKonstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Thu, 30 Aug 2007 04:17:37 +0000 (06:17 +0200)
committerAdrian Bunk <bunk@stusta.de>
Mon, 24 Sep 2007 21:02:46 +0000 (23:02 +0200)
This patch addresses the issue with "osize too small" errors in mppe
encryption.  The patch fixes the issue with wrong output buffer size
being passed to ppp decompression routine.

--------------------
As pointed out by Suresh Mahalingam, the issue addressed by
ppp-fix-osize-too-small-errors-when-decoding patch is not fully resolved yet.
The size of allocated output buffer is correct, however it size passed to
ppp->rcomp->decompress in ppp_generic.c if wrong. The patch fixes that.
--------------------

Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
drivers/net/ppp_generic.c

index 802f249b87c81926a0a911f3dcea622caf795c9c..80ff42d3e1c97e7899370cb5719652f37366f77d 100644 (file)
@@ -1739,7 +1739,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
                }
                /* the decompressor still expects the A/C bytes in the hdr */
                len = ppp->rcomp->decompress(ppp->rc_state, skb->data - 2,
-                               skb->len + 2, ns->data, ppp->mru + PPP_HDRLEN);
+                               skb->len + 2, ns->data, obuff_size);
                if (len < 0) {
                        /* Pass the compressed frame to pppd as an
                           error indication. */