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/mpeg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/mpeg.c') diff --git a/apps/mpeg.c b/apps/mpeg.c index 8518ab68e6..0e1217b5c8 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c @@ -2203,8 +2203,7 @@ void audio_record(const char *filename) { mpeg_errno = 0; - strncpy(recording_filename, filename, MAX_PATH - 1); - recording_filename[MAX_PATH - 1] = 0; + strlcpy(recording_filename, filename, MAX_PATH); queue_post(&mpeg_queue, MPEG_RECORD, 0); } @@ -2509,8 +2508,7 @@ void audio_new_file(const char *filename) { mpeg_errno = 0; - strncpy(recording_filename, filename, MAX_PATH - 1); - recording_filename[MAX_PATH - 1] = 0; + strlcpy(recording_filename, filename, MAX_PATH); queue_post(&mpeg_queue, MPEG_NEW_FILE, 0); } -- cgit v1.2.3