mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 02:58:24 +00:00
[gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros.
Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros. Fixes #582708.
This commit is contained in:
parent
bb8f296d45
commit
69a1a60a87
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue