diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-07-09 22:58:06 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2019-07-09 22:58:06 -0500 |
commit | fc7a45853be2e090110ef4b5e30a158db78d816e (patch) | |
tree | 5fe4503815771e3f2f8cdff9f27f4cb3cd358b5d | |
parent | c0dbfc813092faece53015c0f86313d742f7815a (diff) | |
download | rockbox-fc7a45853be2e090110ef4b5e30a158db78d816e.tar.gz rockbox-fc7a45853be2e090110ef4b5e30a158db78d816e.zip |
Fix possible truncation albumart.c
Change-Id: Ie0e576f26c0507cc12fbdc12093d6fe924377e1d
-rw-r--r-- | apps/recorder/albumart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index c561e36ae2..5b3658a1cb 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c | |||
@@ -141,7 +141,7 @@ static bool try_exts(char *path, int len) | |||
141 | bool search_albumart_files(const struct mp3entry *id3, const char *size_string, | 141 | bool search_albumart_files(const struct mp3entry *id3, const char *size_string, |
142 | char *buf, int buflen) | 142 | char *buf, int buflen) |
143 | { | 143 | { |
144 | char path[MAX_PATH + 1]; | 144 | char path[MAX_PATH + 11]; /* need room for filename and null termination */ |
145 | char dir[MAX_PATH + 1]; | 145 | char dir[MAX_PATH + 1]; |
146 | bool found = false; | 146 | bool found = false; |
147 | int track_first = 1; | 147 | int track_first = 1; |
@@ -281,7 +281,7 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen, | |||
281 | if (!id3 || !buf) | 281 | if (!id3 || !buf) |
282 | return false; | 282 | return false; |
283 | 283 | ||
284 | char size_string[9]; | 284 | char size_string[15];/* .-32768x-32768\0 */ |
285 | logf("Looking for album art for %s", id3->path); | 285 | logf("Looking for album art for %s", id3->path); |
286 | 286 | ||
287 | /* Write the size string, e.g. ".100x100". */ | 287 | /* Write the size string, e.g. ".100x100". */ |