Created
August 28, 2017 10:34
-
-
Save bsdb0y/1134ded7e84bb5de2f53f6f66a69d23a to your computer and use it in GitHub Desktop.
Revisions
-
bsdb0y created this gist
Aug 28, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ diff --git a/libmp3lame/util.c b/libmp3lame/util.c index adde6c4..43c28b8 100644 --- a/libmp3lame/util.c +++ b/libmp3lame/util.c @@ -614,7 +614,14 @@ fill_buffer_resample(lame_internal_flags * gfc, sample_t y; assert(j2 < len); assert(j2 + BLACKSIZE >= 0); + y = (j2 < 0) ? inbuf_old[BLACKSIZE + j2] : inbuf[j2]; + + if ((esv->blackfilt == NULL) || ((unsigned int)esv->blackfilt[joff] == 0x00)) + { + printf("Invalid memory access occured. Input file is probably corrupted.\n"); + exit(-1); + } #ifdef PRECOMPUTE xvalue += y * esv->blackfilt[joff][i]; #else