lz4: Fix pointer overflow
This commit is contained in:
parent
feef882f98
commit
ce01054ec3
1 changed files with 2 additions and 0 deletions
|
@ -184,6 +184,8 @@ LZ4_uncompress_unknownOutputSize(const char *source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* copy literals */
|
/* copy literals */
|
||||||
|
if ((grub_addr_t) length > ~(grub_addr_t)op)
|
||||||
|
goto _output_error;
|
||||||
cpy = op + length;
|
cpy = op + length;
|
||||||
if ((cpy > oend - COPYLENGTH) ||
|
if ((cpy > oend - COPYLENGTH) ||
|
||||||
(ip + length > iend - COPYLENGTH)) {
|
(ip + length > iend - COPYLENGTH)) {
|
||||||
|
|
Loading…
Reference in a new issue