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/plugins/zxbox/spconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/plugins/zxbox/spconf.c') diff --git a/apps/plugins/zxbox/spconf.c b/apps/plugins/zxbox/spconf.c index 5a14959adc..728f78638c 100644 --- a/apps/plugins/zxbox/spconf.c +++ b/apps/plugins/zxbox/spconf.c @@ -111,8 +111,7 @@ void spcf_read_command_line(const void* parameter) file_type = extensions[ix].type; file_subtype = extensions[ix].subtype; - rb->strncpy(filenamebuf, parameter, MAXFILENAME - 10); - filenamebuf[MAXFILENAME-10] = '\0'; + rb->strlcpy(filenamebuf, parameter, MAXFILENAME - 10 + 1); if(file_type < 0) file_subtype = -1; if(!spcf_find_file_type(filenamebuf, &file_type, &file_subtype)) return; -- cgit v1.2.3