mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
m_property: memcpy(ptr, NULL, 0) is undefined
This commit is contained in:
parent
a5c66601ff
commit
ab37a77b36
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user