1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

Check input data; CERT-FI upx-crashes-elf id:000000,sig:11,src:000000,op:flip1,pos:0

This commit is contained in:
John Reiser 2015-05-08 17:04:16 -07:00
parent ae37c3902c
commit f0aef9b28b

View File

@ -300,6 +300,9 @@ static int U(Filter *f)
}
else { // not 1st time at this destination
jc >>= 1;
if (N_MRU <= jc) {
throwCompressedDataViolation();
}
int kh = jc + hand;
if (N_MRU <= kh) {
kh -= N_MRU;