diff options
author | wm4 <wm4@nowhere> | 2015-03-23 18:02:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-23 18:02:28 +0100 |
commit | ab37a77b36dbd6f9b2350d62faf301d1ef8acef3 (patch) | |
tree | 2233fe7d3398633150c69a15a7614122e5114df2 /options/m_property.c | |
parent | a5c66601ff959b75aa204465c285fc88c3c9a326 (diff) | |
download | mpv-ab37a77b36dbd6f9b2350d62faf301d1ef8acef3.tar.bz2 mpv-ab37a77b36dbd6f9b2350d62faf301d1ef8acef3.tar.xz |
m_property: memcpy(ptr, NULL, 0) is undefined
Diffstat (limited to 'options/m_property.c')
-rw-r--r-- | options/m_property.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |