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
cfgfile: constrain string search
[dpdk.git]
/
lib
/
librte_cfgfile
/
rte_cfgfile.c
diff --git
a/lib/librte_cfgfile/rte_cfgfile.c
b/lib/librte_cfgfile/rte_cfgfile.c
index
63e34bb
..
e4a3885
100644
(file)
--- a/
lib/librte_cfgfile/rte_cfgfile.c
+++ b/
lib/librte_cfgfile/rte_cfgfile.c
@@
-191,7
+191,7
@@
rte_cfgfile_load_with_params(const char *filename, int flags,
"Check if line too long\n", lineno);
goto error1;
}
"Check if line too long\n", lineno);
goto error1;
}
- pos = memchr(buffer, params->comment_character,
sizeof(buffer)
);
+ pos = memchr(buffer, params->comment_character,
len
);
if (pos != NULL) {
*pos = '\0';
len = pos - buffer;
if (pos != NULL) {
*pos = '\0';
len = pos - buffer;