From d82244497b54889f91c78585374d1ad6a0cef2cf Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 22 Aug 2007 13:08:42 -0700 Subject: Replace strcpy with strncpy to match previous code block --- src/WrFFrI.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 '_' */ -- cgit v1.2.3