Opened 7 years ago

Closed 7 years ago

#9487 closed bug (fixed)

GIFLoad array subscript below array bounds

Reported by: pdziepak Owned by: pdziepak
Priority: normal Milestone: R1
Component: Add-Ons/Translators/GIF Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Due to variable range propagation enabled GCC notices (incorrectly) that

newEntry[fOldCodeLength] = *fOldCode;

may be unsafe due to fOldCodeLength being a signed integer. When building under Haiku it results in a warning which is treated as an error.

Attachments (1)

0001-Fix-9487-GIFLoad-array-subscript-below-array-bounds.patch (2.5 KB ) - added by pdziepak 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by pdziepak, 7 years ago

Has a Patch: set

comment:2 by pdziepak, 7 years ago

To be honest I was a bit concerned about these copying loops but since I know nothing about GIF format and memcpy() is not an exact equivalent of them I decided to leave it as it is. It is out of scope of this patch anyway.

comment:3 by jscipione, 7 years ago

Note that the warning causes Haiku not to build from within Haiku.

comment:4 by leavengood, 7 years ago

Now that you have commit access I say +1 in committing this Pawel.

comment:5 by pdziepak, 7 years ago

Owner: changed from nobody to pdziepak
Status: newin-progress

comment:6 by pdziepak, 7 years ago

Resolution: fixed
Status: in-progressclosed

Fixed in hrev45358.

Note: See TracTickets for help on using tickets.