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
app/testpmd: add boundary check in flow command
[dpdk.git]
/
app
/
test-pmd
/
cmdline_flow.c
diff --git
a/app/test-pmd/cmdline_flow.c
b/app/test-pmd/cmdline_flow.c
index
5c0108f
..
659908f
100644
(file)
--- a/
app/test-pmd/cmdline_flow.c
+++ b/
app/test-pmd/cmdline_flow.c
@@
-4327,6
+4327,8
@@
parse_int(struct context *ctx, const struct token *token,
}
buf = (uint8_t *)ctx->object + arg->offset;
size = arg->size;
+ if (u > RTE_LEN2MASK(size * CHAR_BIT, uint64_t))
+ return -1;
objmask:
switch (size) {
case sizeof(uint8_t):