[libGD] #75 [Comment added] libGD 2.0.35RC2, GD_GIF_IN.C cannot be less then 0
[email protected] (libGD)
| Newsgroups | php.gd.bugs |
|---|---|
| Message-ID | <[email protected]> |
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#75 - libGD 2.0.35RC2, GD_GIF_IN.C cannot be less then 0
User who did this - Alexey Chupahin (Alexey Chupahin)
----------
Yes, I'm thinking you are correct.
But it seems problem lies not just in signed/unsigned type.
I've just looked into a code once more and see something I dont understand.
Please look:
<code>
if ((int)(count = GetDataBlock(fd, &scd->buf[2], ZeroDataBlockP)) <= 0)
scd->done = TRUE;
scd->last_byte = 2 + count;
scd->curbit = (scd->curbit - scd->lastbit) + 16;
scd->lastbit = (2+count)*8 ;
</code>
if GetDataBlock() returns a number, it seems to be good.
But when it returns -1, count is become -1 too ( undependently of its type: int or unsigned ).
Well, <code> scd->done </code> is become TRUE. Ok.
But next statement will work with this senseless value (this is only a flag)
and values <code> scd->last, scd->curbit, scd->lastbit </code> now are wrong.
----------
More information can be found at the following URL:
http://bugs.libgd.org/?do=details&task_id=75#comment200
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.