From: vobe Date: Thu, 25 Dec 2014 11:11:32 +0000 (+0100) Subject: Prevent segfault while scanning for MP3 files X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a601d66cb7d71bcd7c8f018da11aa7c42fe3fe8;p=picodrive.git Prevent segfault while scanning for MP3 files Make sure the destination string is NULL-terminated when building the uppercase extension. The tmp_ext_u array is uninitialized when it's passed to this function. --- diff --git a/pico/cd/cd_image.c b/pico/cd/cd_image.c index 07b55ce..ae2ef0c 100644 --- a/pico/cd/cd_image.c +++ b/pico/cd/cd_image.c @@ -61,6 +61,7 @@ static void to_upper(char *d, const char *s) else *d = *s; } + *d = 0; } // cdd.c uses lba - 150