Commit db6ef7de authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NET]: Fix signnedness test in socket filter code.

parent 693ae15f
......@@ -256,10 +256,9 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
k = X + fentry->k;
goto load_b;
case BPF_LDX|BPF_B|BPF_MSH:
k = fentry->k;
if (k >= 0 && (unsigned int)k >= len)
if (fentry->k >= len)
return 0;
X = (data[k] & 0xf) << 2;
X = (data[fentry->k] & 0xf) << 2;
continue;
case BPF_LD|BPF_IMM:
A = fentry->k;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment