mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
adapter: Add check for pattern bits not in mask
This commit is contained in:
parent
748433776a
commit
9dbe690f72
1 changed files with 1 additions and 0 deletions
|
@ -880,6 +880,7 @@ gst_adapter_masked_scan_uint32_peek (GstAdapter * adapter, guint32 mask,
|
|||
|
||||
g_return_val_if_fail (size > 0, -1);
|
||||
g_return_val_if_fail (offset + size <= adapter->size, -1);
|
||||
g_return_val_if_fail (((~mask) & pattern) == 0, -1);
|
||||
|
||||
/* we can't find the pattern with less than 4 bytes */
|
||||
if (G_UNLIKELY (size < 4))
|
||||
|
|
Loading…
Reference in a new issue