diff options
Diffstat (limited to 'apps/recorder/albumart.c')
-rw-r--r-- | apps/recorder/albumart.c | 5 |
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 | } |