[gstreamer-bugs] [Bug 582708] New: [GST_UTILS] GST_WRITE_* macros could be safer
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Thu May 14 21:22:46 PDT 2009
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=582708
GStreamer | gstreamer (core) | Ver: git
Summary: [GST_UTILS] GST_WRITE_* macros could be safer
Product: GStreamer
Version: git
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: minor
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: thiagoss at embedded.ufcg.edu.br
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Please describe the problem:
While developing asfmux today I ran over some overflow problems because of the
following:
GST_WRITE_UINT32_LE (mydata, GST_BUFFER_TIMESTAMP (buf) / GST_MSECOND);
however, if I change it to
GST_WRITE_UINT32_LE (mydata, (GST_BUFFER_TIMESTAMP (buf) / GST_MSECOND));
with aditional parameters, it's all ok.
My suggestion is to change the macros to already have this extra parameters to
prevent this in future development.
I tracked the 'problem' to lines 173-4 of
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstutils.h
Just adding the ( ) around __num should do it, right?
Steps to reproduce:
Actual results:
Expected results:
Does this happen every time?
Other information:
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=582708.
More information about the Gstreamer-bugs
mailing list