mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
pluginloader: Don't call memcpy() with NULL src and 0 length
This commit is contained in:
parent
14f817d723
commit
c3e2bf8086
1 changed files with 2 additions and 1 deletions
|
@ -586,7 +586,8 @@ put_packet (GstPluginLoader * l, guint type, guint32 tag,
|
|||
/* 4 bytes packet length */
|
||||
GST_WRITE_UINT32_BE (out + 4, payload_len);
|
||||
/* payload */
|
||||
memcpy (out + HEADER_SIZE, payload, payload_len);
|
||||
if (payload && payload_len)
|
||||
memcpy (out + HEADER_SIZE, payload, payload_len);
|
||||
/* Write magic into the header */
|
||||
GST_WRITE_UINT32_BE (out + 8, HEADER_MAGIC);
|
||||
|
||||
|
|
Loading…
Reference in a new issue