diff mbox series

Fix coverity #292168

Message ID 20200409142249.20847-3-sbabic@denx.de
State Accepted
Headers show
Series Fix coverity #292168 | expand

Commit Message

Stefano Babic April 9, 2020, 2:22 p.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/cpio_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/cpio_utils.c b/core/cpio_utils.c
index 9fe25a6..cf428aa 100644
--- a/core/cpio_utils.c
+++ b/core/cpio_utils.c
@@ -687,7 +687,7 @@  int extract_sw_description(int fd, const char *descfile, off_t *offs)
 		ERROR("File Name too long : %s", fdh.filename);
 		return -1;
 	}
-	strncpy(output_file, TMPDIR, sizeof(output_file));
+	strlcpy(output_file, TMPDIR, sizeof(output_file));
 	strcat(output_file, fdh.filename);
 	fdout = openfileoutput(output_file);