From: Thiago Santos Date: Fri, 15 May 2009 17:42:48 +0000 (-0300) Subject: [gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros. X-Git-Tag: RELEASE-0.10.24~254 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69a1a60a871f8f3c5866b07af2c3a785e129d55d;p=platform%2Fupstream%2Fgstreamer.git [gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros. Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros. Fixes #582708. --- diff --git a/gst/gstutils.h b/gst/gstutils.h index 4e40bba..010254a 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -268,10 +268,10 @@ GST_BOILERPLATE_FULL (type, type_as_function, parent_type, \ /* Define PUT and GET functions for unaligned memory */ #define _GST_GET(__data, __idx, __size, __shift) \ - (((guint##__size) (((guint8 *) (__data))[__idx])) << __shift) + (((guint##__size) (((guint8 *) (__data))[__idx])) << (__shift)) #define _GST_PUT(__data, __idx, __size, __shift, __num) \ - (((guint8 *) (__data))[__idx] = (((guint##__size) __num) >> __shift) & 0xff) + (((guint8 *) (__data))[__idx] = (((guint##__size) (__num)) >> (__shift)) & 0xff) /** * GST_READ_UINT64_BE: