Bug 124654 - [GStreamer] GStreamerVersioning's funtion utility setGstBufferSize casts from signed values to unsigned without checking
Summary: [GStreamer] GStreamerVersioning's funtion utility setGstBufferSize casts from...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 124534
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 07:20 PST by Andres Gomez Garcia
Modified: 2013-12-08 11:40 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.93 KB, patch)
2013-11-20 07:24 PST, Andres Gomez Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gomez Garcia 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.
Comment 1 Andres Gomez Garcia 2013-11-20 07:24:22 PST
Created attachment 217428 [details]
Patch
Comment 2 Martin Robinson 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.
Comment 3 Andres Gomez Garcia 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?
Comment 4 Andres Gomez Garcia 2013-11-25 02:29:38 PST
After closing bug 124534 this becomes INVALID.
Comment 5 Zan Dobersek 2013-12-08 11:40:20 PST
Comment on attachment 217428 [details]
Patch

Clearing the reviewing flags since the patch was closed as invalid.