summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-08-22 13:08:42 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-08-22 13:08:42 -0700
commitd82244497b54889f91c78585374d1ad6a0cef2cf (patch)
tree2bbc6e377111a8c4eaa2fa69467a2a624ffd717f
parent47c974872b51b8c1d6965eff4599f8ce739bcedc (diff)
Replace strcpy with strncpy to match previous code block
-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 '_' */