diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-22 13:08:42 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-22 13:08:42 -0700 |
commit | d82244497b54889f91c78585374d1ad6a0cef2cf (patch) | |
tree | 2bbc6e377111a8c4eaa2fa69467a2a624ffd717f /src | |
parent | 47c974872b51b8c1d6965eff4599f8ce739bcedc (diff) |
Replace strcpy with strncpy to match previous code block
Diffstat (limited to 'src')
-rw-r--r-- | src/WrFFrI.c | 3 |
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 '_' */ |