Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224832
b: refs/heads/master
c: 4bc65dd
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 10, 2010
1 parent 539e64f commit d674fc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60d509c823cca21e77d537bd356785f7cfe8f0d1
refs/heads/master: 4bc65dd8d88671712d71592a83374cfb0b5fce7a
6 changes: 3 additions & 3 deletions trunk/net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ enum {
};

/* No hurry in this branch */
static void *__load_pointer(const struct sk_buff *skb, int k)
static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size)
{
u8 *ptr = NULL;

Expand All @@ -97,7 +97,7 @@ static void *__load_pointer(const struct sk_buff *skb, int k)
else if (k >= SKF_LL_OFF)
ptr = skb_mac_header(skb) + k - SKF_LL_OFF;

if (ptr >= skb->head && ptr < skb_tail_pointer(skb))
if (ptr >= skb->head && ptr + size <= skb_tail_pointer(skb))
return ptr;
return NULL;
}
Expand All @@ -110,7 +110,7 @@ static inline void *load_pointer(const struct sk_buff *skb, int k,
else {
if (k >= SKF_AD_OFF)
return NULL;
return __load_pointer(skb, k);
return __load_pointer(skb, k, size);
}
}

Expand Down

0 comments on commit d674fc0

Please sign in to comment.