[dpdk-dev,v5,16/16] app/test-bbdev: strcpy ok for allocated string
Checks
Commit Message
Signed-off-by: Andy Green <andy@warmcat.com>
Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev")
Cc: stable@dpdk.org
---
app/test-bbdev/test_bbdev_vector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -891,7 +891,6 @@ test_bbdev_vector_read(const char *filename,
goto exit;
}
- memset(entry, 0, strlen(line) + 1);
strcpy(entry, line);
/* check if entry ends with , or = */
@@ -914,7 +913,8 @@ test_bbdev_vector_read(const char *filename,
}
entry = entry_extended;
- strncat(entry, line, strlen(line));
+ /* entry has been allocated accordingly */
+ strcpy(&entry[strlen(entry)], line);
if (entry[strlen(entry) - 1] != ',')
break;