summaryrefslogtreecommitdiff
path: root/net/x25/x25_in.c
diff options
context:
space:
mode:
authorandrew hendry <andrew.hendry@gmail.com>2010-11-03 12:54:53 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 13:33:29 -0800
commit70d5f4e7ddb91da21169629548b763cc1244c374 (patch)
tree22abe44d0f4700b0737ed77ca1f1599a1c6394c9 /net/x25/x25_in.c
parent3908f08f0c5a6f67ee7c7cf2e816d01a5cf2d259 (diff)
memory corruption in X.25 facilities parsing
commit a6331d6f9a4298173b413cf99a40cc86a9d92c37 upstream. Signed-of-by: Andrew Hendry <andrew.hendry@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/x25/x25_in.c')
-rw-r--r--net/x25/x25_in.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c
index 63178961efac..f729f022be69 100644
--- a/net/x25/x25_in.c
+++ b/net/x25/x25_in.c
@@ -119,6 +119,8 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp
&x25->vc_facil_mask);
if (len > 0)
skb_pull(skb, len);
+ else
+ return -1;
/*
* Copy any Call User Data.
*/