pluginloader: Don't call memcpy() with NULL src and 0 length

This commit is contained in:
Sebastian Dröge 2013-08-20 13:58:24 +02:00
parent 14f817d723
commit c3e2bf8086

View file

@ -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);