summaryrefslogtreecommitdiff
path: root/src/WrFFrI.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/WrFFrI.c')
-rw-r--r--src/WrFFrI.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/WrFFrI.c b/src/WrFFrI.c
index 6477188..15043e8 100644
--- a/src/WrFFrI.c
+++ b/src/WrFFrI.c
@@ -139,7 +139,8 @@ XpmWriteFileFromXpmImage(filename, image, info)
}
if (strchr(name, '-')) {
if (name != new_name) {
- strcpy(new_name, name);
+ strncpy(new_name, name, sizeof(new_name));
+ new_name[sizeof(new_name)-1] = '\0';
name = new_name;
}
/* change '-' to '_' */