diff --git a/options/m_property.c b/options/m_property.c index d16767b34d..f4810579da 100644 --- a/options/m_property.c +++ b/options/m_property.c @@ -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; }