Circular loop codes
bharadwaj
bharadwaj19apr at gmail.com
Thu Aug 2 04:55:44 PDT 2012
Hi,
else if (fresh)
{
fresh = 0;
do
{
firstcode = oldcode = gif_get_code(fp, code_size, 0);
}
while (firstcode == clear_code);
return (firstcode & 255);
}
In do-while should it be firstcode == clear_code >=. Since for one of the files which has clear_code=32. In first iteration i get 32, in 2nd iteration value is 44. Which is assigned in the table for entry 34. On continuing i get the table entries as
table[0][34] 44
table[0][35] 34
table[0][36] 35
table[0][37] 36
table[0][38] 37
table[0][39] 38
table[0][40] 39
table[0][41] 40
table[0][42] 41
table[0][43] 42
table[0][44] 43
and resulting in a loop, and stack overflow.
More information about the cups
mailing list