CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access
This commit is contained in:
parent
597c4fbaa1
commit
10a4c5f1de
@ -2930,9 +2930,13 @@ void CLASS kodak_65000_load_raw()
|
|||||||
pred[0] = pred[1] = 0;
|
pred[0] = pred[1] = 0;
|
||||||
len = MIN (256, width-col);
|
len = MIN (256, width-col);
|
||||||
ret = kodak_65000_decode (buf, len);
|
ret = kodak_65000_decode (buf, len);
|
||||||
for (i=0; i < len; i++)
|
for (i=0; i < len; i++) {
|
||||||
if ((RAW(row,col+i) = curve[ret ? buf[i] :
|
int idx = ret ? buf[i] : (pred[i & 1] += buf[i]);
|
||||||
(pred[i & 1] += buf[i])]) >> 12) derror();
|
if(idx >=0 && idx <= 0xffff) {
|
||||||
|
if ((RAW(row,col+i) = curve[idx]) >> 12) derror();
|
||||||
|
} else
|
||||||
|
derror();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user