Bug 124654

Summary: [GStreamer] GStreamerVersioning's funtion utility setGstBufferSize casts from signed values to unsigned without checking
Product: WebKit Reporter: Andres Gomez Garcia <agomez>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: andersca, commit-queue, eric.carlson, gustavo, menard, mrobinson, ossy, pnormand, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 124534    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Andres Gomez Garcia
Reported 2013-11-20 07:20:22 PST
setGstBufferSize allows an "int" typed value as newSize and casts to unsigned "gsize" type for the 0.10 version.
Attachments
Patch (2.93 KB, patch)
2013-11-20 07:24 PST, Andres Gomez Garcia
no flags
Andres Gomez Garcia
Comment 1 2013-11-20 07:24:22 PST
Martin Robinson
Comment 2 2013-11-20 08:41:29 PST
Comment on attachment 217428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217428&action=review setGstBufferSize will be going away once the GStreamer 0.10 code is removed. It might be better to re-evaluate your patch then. > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:166 > + ASSERT((static_cast<gint64>(G_MINSSIZE) > newSize) > + || (static_cast<gint64>(G_MAXSSIZE) < newSize)); This should be one line. > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:171 > + ASSERT((0 > newSize) > + || (static_cast<gint64>(G_MAXUINT) < newSize)); Ditto.
Andres Gomez Garcia
Comment 3 2013-11-20 09:45:58 PST
(In reply to comment #2) > (From update of attachment 217428 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=217428&action=review > > setGstBufferSize will be going away once the GStreamer 0.10 code is removed. It might be better to re-evaluate your patch then. Blocking with bug 124534 , then. > > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:166 > > + ASSERT((static_cast<gint64>(G_MINSSIZE) > newSize) > > + || (static_cast<gint64>(G_MAXSSIZE) < newSize)); > > This should be one line. Just to know for further patches. I was just following the recommendation in the point 5. of the "Indentation" section at: http://www.webkit.org/coding/coding-style.html Then, which is the maximum line length or when it is OK to write a sentence in more than one line?
Andres Gomez Garcia
Comment 4 2013-11-25 02:29:38 PST
After closing bug 124534 this becomes INVALID.
Zan Dobersek
Comment 5 2013-12-08 11:40:20 PST
Comment on attachment 217428 [details] Patch Clearing the reviewing flags since the patch was closed as invalid.
Note You need to log in before you can comment on or make changes to this bug.