[Bug 755971] queue2: may overflow unsigned integer arithmetic

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 6 04:55:10 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=755971

Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #312723|none                        |needs-work
             status|                            |

--- Comment #9 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Review of attachment 312723:
 --> (https://bugzilla.gnome.org/review?bug=755971&attachment=312723)

The change ended exceeding 80 chars. I took this opportunity to note other
small things.

::: tests/check/elements/queue2.c
@@ +299,3 @@
+      "max-size-buffers", (guint) 0,
+      "max-size-time", (guint64) 2 * GST_SECOND,
+      "max-size-bytes", (guint) 0, NULL);

All 3 casts are useless here. 2 * GST_SECOND will do the multiplation in
guint64, for the rest guint and gint are binary compatible for vararg.

@@ +314,3 @@
+  for (i = 0; i < 20; i++) {
+    buffer = gst_buffer_new_and_alloc (1024);
+    GST_BUFFER_PTS (buffer) = G_GUINT64_CONSTANT(18446744071709551616) + i *
(GST_SECOND / 10);    /* 10 FPS */

That exceeds 80 chat.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list