From e94025271b4219c007375b493f101cb41128870c Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Sun, 23 Aug 2020 19:01:42 +0100 Subject: [PATCH] Avoid coverity warning by using memmove rather than strcpy --- Tools/gdomap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/gdomap.c b/Tools/gdomap.c index bfd380b65..0e6ec8145 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -1557,7 +1557,7 @@ load_iface(const char* from) } if (ptr != buf) { - strcpy(buf, ptr); + memmove(buf, ptr, strlen(ptr) + 1); } /* * Strip comments. @@ -1629,7 +1629,7 @@ load_iface(const char* from) } if (ptr != buf) { - strcpy(buf, ptr); + memmove(buf, ptr, strlen(ptr) + 1); } /* * Strip comments. @@ -4968,7 +4968,7 @@ printf( } if (ptr != buf) { - strcpy(buf, ptr); + memmove(buf, ptr, strlen(ptr) + 1); } /* * Strip comments.