Skip to content

Commit

Permalink
[jan] Update lz4 source to r119 (CVE-2014-4715).
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jul 3, 2014
1 parent 4acd1cc commit c335f66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions framework/lz4/lz4.c
Expand Up @@ -922,7 +922,9 @@ FORCE_INLINE int LZ4_decompress_generic(
length += s;
}
while (likely((endOnInput)?ip<iend-RUN_MASK:1) && (s==255));
if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */
//if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */
if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* quickfix issue 134 */
if ((endOnInput) && (sizeof(void*)==4) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* quickfix issue 134 */
}

/* copy literals */
Expand Down Expand Up @@ -957,11 +959,12 @@ FORCE_INLINE int LZ4_decompress_generic(
unsigned s;
do
{
if (endOnInput && (ip > iend-LASTLITERALS)) goto _output_error;
if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error;
s = *ip++;
length += s;
} while (s==255);
if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */
//if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */
if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)op)) goto _output_error; /* quickfix issue 134 */
}

/* check external dictionary */
Expand Down
4 changes: 2 additions & 2 deletions framework/lz4/package.xml
Expand Up @@ -21,7 +21,7 @@
</stability>
<license uri="http://opensource.org/licenses/MIT">MIT (Expat)</license>
<notes>
*
* [jan] Update lz4 source to r119 (CVE-2014-4715).
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -186,7 +186,7 @@
<date>2014-07-03</date>
<license uri="http://opensource.org/licenses/MIT">MIT (Expat)</license>
<notes>
*
* [jan] Update lz4 source to r119 (CVE-2014-4715).
</notes>
</release>
</changelog>
Expand Down

0 comments on commit c335f66

Please sign in to comment.