Created
August 28, 2017 10:34
-
-
Save bsdb0y/1134ded7e84bb5de2f53f6f66a69d23a to your computer and use it in GitHub Desktop.
Patch for CVE-2017-9411 in LAME 3.99.5
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 characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment