[Webkit-unassigned] [Bug 69669] WebKit2/Shared/APIClient.h complains that array subscript is below array bounds

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 12 05:45:22 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=69669


Rafael Brandao <rafael.lobo at openbossa.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #110225|0                           |1
        is obsolete|                            |
 Attachment #110225|review?, commit-queue?      |
               Flag|                            |
 Attachment #110674|                            |review?, commit-queue?
               Flag|                            |




--- Comment #3 from Rafael Brandao <rafael.lobo at openbossa.org>  2011-10-12 05:45:22 PST ---
Created an attachment (id=110674)
 --> (https://bugs.webkit.org/attachment.cgi?id=110674&action=review)
Added a check for non-negative value for array's index

I've googled a bit about this warning and I've found out that sometimes the compiler make some optimizations on the code and the access on arrays may be negative values after these changes (sources: http://www.mail-archive.com/gcc@gcc.gnu.org/msg46397.html and http://gcc.gnu.org/ml/gcc/2009-09/msg00270.html). So I've just added a check for non-negative values for that index and it has stopped complaining. :)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list