[Bug 755971] queue2: may overflow unsigned integer arithmetic
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Oct 6 04:42:42 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 #312709|none |needs-work
status| |
--- Comment #7 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Review of attachment 312709:
--> (https://bugzilla.gnome.org/review?bug=755971&attachment=312709)
::: plugins/elements/gstqueue2.c
@@ +836,3 @@
return FALSE;
}
+#define GET_PERCENT(format,alt_max) ((queue->max_level.format) > 0 ? MIN (100,
gst_util_uint64_scale(queue->cur_level.format, 100, ((alt_max) > 0 ? MIN
((alt_max), (queue->max_level.format)) : (queue->max_level.format)))) : 0)
This is way over 80 char limit by the coding standard (the thing to fix
absolutly). I would allow myself to suggest to make this an inline function,
with proper if statement. This will be less likely prone to hide errors for the
future.
--
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