diff mbox series

Fix #292114

Message ID 20200419193104.22351-2-sbabic@denx.de
State Accepted
Headers show
Series Fix #292114 | expand

Commit Message

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

Patch

diff --git a/core/notifier.c b/core/notifier.c
index c21dcfa..03fddf8 100644
--- a/core/notifier.c
+++ b/core/notifier.c
@@ -102,7 +102,7 @@  void notify(RECOVERY_STATUS status, int error, int level, const char *msg)
 			notifymsg.error = error;
 			notifymsg.level = level;
 			if (msg)
-				strcpy(notifymsg.buf, msg);
+				strlcpy(notifymsg.buf, msg, sizeof(notifymsg.buf) - 1);
 			else
 				notifymsg.buf[0] = '\0';
 			sendto(notifyfd, &notifymsg, sizeof(notifymsg), 0,