summaryrefslogtreecommitdiff
path: root/apps/recorder/albumart.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-07-14 13:57:45 +0000
committerNils Wallménius <nils@rockbox.org>2009-07-14 13:57:45 +0000
commit3d4701a6e41616cf581a297bab1451cf2db70249 (patch)
treef845837c96ffbed7d59ddf8308f3b3e7c40cb8c9 /apps/recorder/albumart.c
parentc2900a1bacd5d98b57a0d15ea2add1bc08764057 (diff)
downloadrockbox-3d4701a6e41616cf581a297bab1451cf2db70249.tar.gz
rockbox-3d4701a6e41616cf581a297bab1451cf2db70249.zip
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
Diffstat (limited to 'apps/recorder/albumart.c')
-rw-r--r--apps/recorder/albumart.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 6bd2adade3..a378c332b3 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -66,8 +66,7 @@ static char* strip_filename(char* buf, int buf_size, const char* fullpath)
66 } 66 }
67 67
68 len = MIN(sep - fullpath + 1, buf_size - 1); 68 len = MIN(sep - fullpath + 1, buf_size - 1);
69 strncpy(buf, fullpath, len); 69 strlcpy(buf, fullpath, len + 1);
70 buf[len] = 0;
71 return (sep + 1); 70 return (sep + 1);
72} 71}
73 72
@@ -266,7 +265,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
266 if (!found) 265 if (!found)
267 return false; 266 return false;
268 267
269 strncpy(buf, path, buflen); 268 strlcpy(buf, path, buflen);
270 logf("Album art found: %s", path); 269 logf("Album art found: %s", path);
271 return true; 270 return true;
272} 271}