diff mbox

Fix coverity #292121

Message ID 20200415201114.876-1-sbabic@denx.de
State Accepted
Headers show

Commit Message

Stefano Babic April 15, 2020, 8:11 p.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/progress_thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/core/progress_thread.c b/core/progress_thread.c
index 4f29d6a..5cb89eb 100644
--- a/core/progress_thread.c
+++ b/core/progress_thread.c
@@ -119,8 +119,8 @@  void swupdate_progress_inc_step(char *image, char *handler_name)
 	pthread_mutex_lock(&prbar->lock);
 	prbar->msg.cur_step++;
 	prbar->msg.cur_percent = 0;
-	strncpy(prbar->msg.cur_image, image, sizeof(prbar->msg.cur_image));
-	strncpy(prbar->msg.hnd_name, handler_name, sizeof(prbar->msg.hnd_name));
+	strlcpy(prbar->msg.cur_image, image, sizeof(prbar->msg.cur_image));
+	strlcpy(prbar->msg.hnd_name, handler_name, sizeof(prbar->msg.hnd_name));
 	prbar->step_running = true;
 	prbar->msg.status = RUN;
 	send_progress_msg();