Module Name:    src
Committed By:   skrll
Date:           Sun Oct 29 13:11:59 UTC 2023

Modified Files:
        src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
Fix cross compiling by using snprintf instead of strlcpy


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/solib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/solib.c
diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.12 src/external/gpl3/gdb/dist/gdb/solib.c:1.13
--- src/external/gpl3/gdb/dist/gdb/solib.c:1.12	Tue Aug 29 20:39:17 2023
+++ src/external/gpl3/gdb/dist/gdb/solib.c	Sun Oct 29 13:11:59 2023
@@ -482,7 +482,7 @@ solib_bfd_open (const char *pathname)
 	  char buf[SO_NAME_MAX_PATH_SIZE], arch[128], *colon;
           struct stat st;
 
-	  strlcpy(arch, b->printable_name, sizeof(arch));
+	  snprintf(arch, sizeof(arch), "%s", b->printable_name);
 	  if ((colon = strchr(arch, ':')) != NULL)
 		*colon = '\0';
 	  snprintf(buf, sizeof(buf), "%.*s/%s/%s",

Reply via email to