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:
parent
ab37a77b36
commit
16a5c6c535
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user