Skip to content

Commit

Permalink
protect against bad data during decompression
Browse files Browse the repository at this point in the history
use the _safe function instead othe _fast one
  • Loading branch information
gray committed Feb 8, 2014
1 parent 6c645ae commit 00e43f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LZ4.xs
Expand Up @@ -103,7 +103,7 @@ CODE:
XSRETURN_UNDEF;

if (1 == items)
ret = LZ4_decompress_fast(src + 4, dest, dest_len);
ret = LZ4_decompress_safe(src + 4, dest, src_len - 4, dest_len);
else
ret = LZ4_decompress_safe(src, dest, src_len, dest_len);

Expand Down

0 comments on commit 00e43f2

Please sign in to comment.