[git commit] popmaildir: placate gcc8 "warning: 'strncpy' output truncated"
Denys Vlasenko
vda.linux at googlemail.com
Mon May 14 09:14:58 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=2ccd3522816291bd7e3ede3f60370d725d86e179
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
mailutils/popmaildir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index a4aad3662..589456715 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -265,7 +265,7 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
// atomically move message to ./new/
target = xstrdup(filename);
- strncpy(target, "new", 3);
+ memcpy(target, "new", 3);
// ... or just stop receiving on failure
if (rename_or_warn(filename, target))
break;
More information about the busybox-cvs
mailing list