[Webkit-unassigned] [Bug 53281] To determine image properties, CG allocates memory which isn't included in CachedImage's decoded size
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 1 10:30:13 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=53281
--- Comment #11 from Ian Henderson <ianh at apple.com> 2011-02-01 10:30:13 PST ---
(In reply to comment #9)
> (From update of attachment 80705 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=80705&action=review
>
> > Source/WebCore/platform/graphics/BitmapImage.cpp:159
> > + int deltaBytes = updatedSize;
> > + deltaBytes -= m_decodedPropertiesSize;
>
> It would be a little more conventional to just write:
>
> int deltaBytes = updatedSize - m_decodedPropertiesSize;
>
> Subtracting two size_t and putting the result into an int could result in overflow. What guarantees the difference in size will fit in an int?
Is there a standard way in WebCore to get a signed difference of unsigned values? Should I add an ASSERT that checks for overflow?
--
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