aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/psxbios.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/psxbios.c')
-rw-r--r--libpcsxcore/psxbios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index b3435ad..12c17ef 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -1837,7 +1837,8 @@ int nfile;
if ((*ptr & 0xF0) != 0x50) continue; \
ptr+= 0xa; \
if (pfile[0] == 0) { \
- strcpy(dir->name, ptr); \
+ strncpy(dir->name, ptr, sizeof(dir->name)); \
+ dir->name[sizeof(dir->name) - 1] = '\0'; \
} else for (i=0; i<20; i++) { \
if (pfile[i] == ptr[i]) { \
dir->name[i] = ptr[i]; \