1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 18:05:21 +00:00

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

This commit is contained in:
wm4 2015-03-23 18:03:45 +01:00
parent ab37a77b36
commit 16a5c6c535

View File

@ -106,7 +106,9 @@ static bool strndup_append_at(char **str, size_t at, const char *append,
*str = t;
}
memcpy(*str + at, append, append_len);
if (append_len)
memcpy(*str + at, append, append_len);
(*str)[at + append_len] = '\0';
ta_dbg_mark_as_string(*str);