Merge branch 'wip/smcv/gvariant-memcpy0' into 'master'

gvariant-core: Don't pass NULL second argument to memcpy

See merge request GNOME/glib!1303
This commit is contained in:
Philip Withnall 2020-01-07 16:16:35 +00:00
commit a7880d84d0

View File

@ -554,6 +554,7 @@ g_variant_new_from_bytes (const GVariantType *type,
aligned_size) != 0) aligned_size) != 0)
g_error ("posix_memalign failed"); g_error ("posix_memalign failed");
if (aligned_size != 0)
memcpy (aligned_data, g_bytes_get_data (bytes, NULL), aligned_size); memcpy (aligned_data, g_bytes_get_data (bytes, NULL), aligned_size);
bytes = owned_bytes = g_bytes_new_with_free_func (aligned_data, bytes = owned_bytes = g_bytes_new_with_free_func (aligned_data,