aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ppp_async.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 933e2f3c77aa..caabbc408c34 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -802,9 +802,9 @@ process_input_packet(struct asyncppp *ap)
802 802
803 /* check for address/control and protocol compression */ 803 /* check for address/control and protocol compression */
804 p = skb->data; 804 p = skb->data;
805 if (p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) { 805 if (p[0] == PPP_ALLSTATIONS) {
806 /* chop off address/control */ 806 /* chop off address/control */
807 if (skb->len < 3) 807 if (p[1] != PPP_UI || skb->len < 3)
808 goto err; 808 goto err;
809 p = skb_pull(skb, 2); 809 p = skb_pull(skb, 2);
810 } 810 }