Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
New upstream version 18.11-rc3
[deb_dpdk.git]
/
lib
/
librte_pci
/
rte_pci.c
diff --git
a/lib/librte_pci/rte_pci.c
b/lib/librte_pci/rte_pci.c
index
530738d
..
f400178
100644
(file)
--- a/
lib/librte_pci/rte_pci.c
+++ b/
lib/librte_pci/rte_pci.c
@@
-30,6
+30,10
@@
get_u8_pciaddr_field(const char *in, void *_u8, char dlm)
uint8_t *u8 = _u8;
char *end;
+ /* empty string is an error though strtoul() returns 0 */
+ if (*in == '\0')
+ return NULL;
+
errno = 0;
val = strtoul(in, &end, 16);
if (errno != 0 || end[0] != dlm || val > UINT8_MAX) {