Skip to content

Instantly share code, notes, and snippets.

@bsdb0y
Created August 28, 2017 10:34
Show Gist options
  • Save bsdb0y/1134ded7e84bb5de2f53f6f66a69d23a to your computer and use it in GitHub Desktop.
Save bsdb0y/1134ded7e84bb5de2f53f6f66a69d23a to your computer and use it in GitHub Desktop.

Revisions

  1. bsdb0y created this gist Aug 28, 2017.
    19 changes: 19 additions & 0 deletions lame_3.99.5_cve_2017_9411.patch
    Original 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