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
mbuf: enforce no option for dynamic fields and flags
[dpdk.git]
/
app
/
test-eventdev
/
parser.c
diff --git
a/app/test-eventdev/parser.c
b/app/test-eventdev/parser.c
index
24f1855
..
8818c37
100644
(file)
--- a/
app/test-eventdev/parser.c
+++ b/
app/test-eventdev/parser.c
@@
-310,7
+310,7
@@
parse_hex_string(char *src, uint8_t *dst, uint32_t *size)
}
int
}
int
-parse_lcores_list(bool lcores[], const char *corelist)
+parse_lcores_list(bool lcores[],
int lcores_num,
const char *corelist)
{
int i, idx = 0;
int min, max;
{
int i, idx = 0;
int min, max;
@@
-332,6
+332,8
@@
parse_lcores_list(bool lcores[], const char *corelist)
if (*corelist == '\0')
return -1;
idx = strtoul(corelist, &end, 10);
if (*corelist == '\0')
return -1;
idx = strtoul(corelist, &end, 10);
+ if (idx < 0 || idx > lcores_num)
+ return -1;
if (end == NULL)
return -1;
if (end == NULL)
return -1;