From fc7a45853be2e090110ef4b5e30a158db78d816e Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 9 Jul 2019 22:58:06 -0500 Subject: Fix possible truncation albumart.c Change-Id: Ie0e576f26c0507cc12fbdc12093d6fe924377e1d --- apps/recorder/albumart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') 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) bool search_albumart_files(const struct mp3entry *id3, const char *size_string, char *buf, int buflen) { - char path[MAX_PATH + 1]; + char path[MAX_PATH + 11]; /* need room for filename and null termination */ char dir[MAX_PATH + 1]; bool found = false; int track_first = 1; @@ -281,7 +281,7 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen, if (!id3 || !buf) return false; - char size_string[9]; + char size_string[15];/* .-32768x-32768\0 */ logf("Looking for album art for %s", id3->path); /* Write the size string, e.g. ".100x100". */ -- cgit v1.2.3