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.08
[deb_dpdk.git]
/
app
/
test-crypto-perf
/
cperf_test_vector_parsing.c
diff --git
a/app/test-crypto-perf/cperf_test_vector_parsing.c
b/app/test-crypto-perf/cperf_test_vector_parsing.c
index
26321d0
..
92932a2
100644
(file)
--- a/
app/test-crypto-perf/cperf_test_vector_parsing.c
+++ b/
app/test-crypto-perf/cperf_test_vector_parsing.c
@@
-506,8
+506,7
@@
parse_file(struct cperf_test_vector *vector, struct cperf_options *opts)
if (entry == NULL)
return -1;
if (entry == NULL)
return -1;
- memset(entry, 0, strlen(line) + 1);
- strncpy(entry, line, strlen(line));
+ strcpy(entry, line);
/* check if entry ends with , or = */
if (entry[strlen(entry) - 1] == ','
/* check if entry ends with , or = */
if (entry[strlen(entry) - 1] == ','
@@
-524,8
+523,8
@@
parse_file(struct cperf_test_vector *vector, struct cperf_options *opts)
if (entry_extended == NULL)
goto err;
entry = entry_extended;
if (entry_extended == NULL)
goto err;
entry = entry_extended;
-
- str
ncat(entry, line, strlen(line)
);
+ /* entry has been allocated accordingly */
+ str
cpy(&entry[strlen(entry)], line
);
if (entry[strlen(entry) - 1] != ',')
break;
if (entry[strlen(entry) - 1] != ',')
break;