lz4: Fix pointer overflow

This commit is contained in:
Toomas Soome authored and Vladimir Serbinenko committed 2016-02-12 17:26:32 +01:00
1 parent feef882f98
commit ce01054ec3
1 file changed
+2
+2
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)) {