We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bfd9df commit d1a358bCopy full SHA for d1a358b
packet01-parsing/xdp_prog_kern.c
@@ -36,7 +36,7 @@ static __always_inline int parse_ethhdr(struct hdr_cursor *nh,
36
/* Byte-count bounds check; check if current pointer + size of header
37
* is after data_end.
38
*/
39
- if (nh->pos + 1 > data_end)
+ if (nh->pos + hdrsize > data_end)
40
return -1;
41
42
nh->pos += hdrsize;
0 commit comments