0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

m_property: memcpy(ptr, NULL, 0) is undefined

This commit is contained in:
wm4 2015-03-23 18:02:28 +01:00
parent a5c66601ff
commit ab37a77b36

View File

@ -273,7 +273,8 @@ static int m_property_do_bstr(const struct m_property *prop_list, bstr name,
static void append_str(char **s, int *len, bstr append)
{
MP_TARRAY_GROW(NULL, *s, *len + append.len);
memcpy(*s + *len, append.start, append.len);
if (append.len)
memcpy(*s + *len, append.start, append.len);
*len = *len + append.len;
}