git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bpf: fix check array size
[dpdk.git]
/
lib
/
librte_bpf
/
bpf_validate.c
diff --git
a/lib/librte_bpf/bpf_validate.c
b/lib/librte_bpf/bpf_validate.c
index
83983ef
..
d0e683b
100644
(file)
--- a/
lib/librte_bpf/bpf_validate.c
+++ b/
lib/librte_bpf/bpf_validate.c
@@
-1084,7
+1084,7
@@
eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
/*
* validate parameters for each instruction type.
*/
/*
* validate parameters for each instruction type.
*/
-static const struct bpf_ins_check ins_chk[UINT8_MAX] = {
+static const struct bpf_ins_check ins_chk[UINT8_MAX
+ 1
] = {
/* ALU IMM 32-bit instructions */
[(BPF_ALU | BPF_ADD | BPF_K)] = {
.mask = {.dreg = WRT_REGS, .sreg = ZERO_REG},
/* ALU IMM 32-bit instructions */
[(BPF_ALU | BPF_ADD | BPF_K)] = {
.mask = {.dreg = WRT_REGS, .sreg = ZERO_REG},