[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 - Pierre Joye (Pierre)

----------
>I'm thinking, the fastest, simplest and safest way for now is using a (int) modifier as I do in the patch.

The problem here is that unsigned char can end with a positive value even when the returned integer is negative. It can lead to real bugs, good catch!

However I think sure your patch is not correct. A normal compiler will first process (count = get...()), when the integer cast is done, the first cast (to unsigned char) is already done, it is too late to solve the issue. The problem is actually the cast from signed int (or int) to unsigned char. http://docs.hp.com/en/B3901-90003/ch05s05.html explains it well.

We will have to double check this code and fix it as soon as possible (maybe not for 2.0.35) :)
----------

More information can be found at the following URL:
http://bugs.libgd.org/?do=details&task_id=75#comment199

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.