aboutsummaryrefslogtreecommitdiff
path: root/net/x25/x25_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/x25/x25_link.c')
-rw-r--r--net/x25/x25_link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c
index 037958ff8ee..4acacf3c661 100644
--- a/net/x25/x25_link.c
+++ b/net/x25/x25_link.c
@@ -90,6 +90,9 @@ void x25_link_control(struct sk_buff *skb, struct x25_neigh *nb,
break;
case X25_DIAGNOSTIC:
+ if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 4))
+ break;
+
printk(KERN_WARNING "x25: diagnostic #%d - %02X %02X %02X\n",
skb->data[3], skb->data[4],
skb->data[5], skb->data[6]);