lz4: Fix pointer overflow

This commit is contained in:
Toomas Soome 2016-02-12 16:31:23 +01:00 committed by Vladimir Serbinenko
parent feef882f98
commit ce01054ec3

View file

@ -184,6 +184,8 @@ LZ4_uncompress_unknownOutputSize(const char *source,
}
}
/* copy literals */
if ((grub_addr_t) length > ~(grub_addr_t)op)
goto _output_error;
cpy = op + length;
if ((cpy > oend - COPYLENGTH) ||
(ip + length > iend - COPYLENGTH)) {