Fix possible infinite loop in dcraw
Use same type for variable comparison in loop condition. Fixes CodeQL alert 96.
This commit is contained in:
parent
65a14051fe
commit
6daf3f6a23
@ -345,7 +345,10 @@ int LibRaw::ljpeg_start(struct jhead *jh, int info_only)
|
|||||||
if (jh->sraw)
|
if (jh->sraw)
|
||||||
{
|
{
|
||||||
FORC(4) jh->huff[2 + c] = jh->huff[1];
|
FORC(4) jh->huff[2 + c] = jh->huff[1];
|
||||||
FORC(jh->sraw) jh->huff[1 + c] = jh->huff[0];
|
{
|
||||||
|
int c;
|
||||||
|
FORC(jh->sraw) jh->huff[1 + c] = jh->huff[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jh->row = (ushort *)calloc(jh->wide * jh->clrs, 16);
|
jh->row = (ushort *)calloc(jh->wide * jh->clrs, 16);
|
||||||
return zero_after_ff = 1;
|
return zero_after_ff = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user