From 3d4701a6e41616cf581a297bab1451cf2db70249 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Tue, 14 Jul 2009 13:57:45 +0000 Subject: FS#10080 * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/tree.c') diff --git a/apps/tree.c b/apps/tree.c index ef65c6d86c..576453a3ad 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -505,7 +505,7 @@ char *getcwd(char *buf, int size) return tc.currdir; else if (size > 0) { - strncpy(buf, tc.currdir, size); + strlcpy(buf, tc.currdir, size); return buf; } else @@ -924,7 +924,7 @@ int rockbox_browse(const char *root, int dirfilter) } else { - strncpy(current, LANG_DIR "/english.lng", sizeof(current)); + strlcpy(current, LANG_DIR "/english.lng", sizeof(current)); } } /* Center on currently loaded WPS */ -- cgit v1.2.3