Closed
Bug 621987
Opened 15 years ago
Closed 15 years ago
unary - applied to unsigned var in ConvertImage
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: bjacob)
Details
Attachments
(1 file)
1.15 KB,
patch
|
vlad
:
review+
joe
:
approval2.0+
|
Details | Diff | Splinter Review |
13:38 < vlad> bjacob_: msvc is giving a warning that I think is a problem
13:38 < vlad> in ConvertImage(), dst_delta = mPixelStoreFlipY ? -dstStride :
dstStride;
13:38 < vlad> dstStride is unsigned, so applying unary - leaves it as unsigned
13:38 < vlad> which means it'll become a bignum instead of negative
13:38 < bjacob_> oh oh
13:39 < vlad> I think that needs to be -ptrdiff_t(dstStride)
13:39 < bjacob_> rather, math dstStride signed
13:39 < bjacob_> s/math/make
13:39 < bjacob_> amazing that this wouldn't have resulted in massive test
failure and even crashes
Assignee | ||
Comment 1•15 years ago
|
||
OK, there's a real bug here, doing as you suggested a ptrdiff_t cast because outside of this line of code it generally makes sense for the strides to be unsigned.
Attachment #500258 -
Flags: review?(vladimir)
Reporter | ||
Updated•15 years ago
|
Attachment #500258 -
Flags: review?(vladimir) → review+
Updated•15 years ago
|
Attachment #500258 -
Flags: approval2.0+
Assignee | ||
Comment 2•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•