summaryrefslogtreecommitdiff
path: root/net/phonet/pep.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet/pep.c')
-rw-r--r--net/phonet/pep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/phonet/pep.c b/net/phonet/pep.c
index 706927139393..31b29e3ca7bc 100644
--- a/net/phonet/pep.c
+++ b/net/phonet/pep.c
@@ -55,6 +55,8 @@ static unsigned char *pep_get_sb(struct sk_buff *skb, u8 *ptype, u8 *plen,
ph = skb_header_pointer(skb, 0, 2, &h);
if (ph == NULL || ph->sb_len < 2 || !pskb_may_pull(skb, ph->sb_len))
return NULL;
+ /* pskb_may_pull() may have reallocated the head; refetch ph. */
+ ph = skb_header_pointer(skb, 0, 2, &h);
ph->sb_len -= 2;
*ptype = ph->sb_type;
*plen = ph->sb_len;