mirror of https://github.com/mpv-player/mpv
talloc: fix strndup group of functions
This bug has been fixed years ago in upstream talloc.
This commit is contained in:
parent
32c5a87a01
commit
38a8a8d3d2
4
talloc.c
4
talloc.c
|
@ -1421,7 +1421,7 @@ char *talloc_strdup_append_buffer(char *s, const char *a)
|
|||
char *talloc_strndup_append(char *s, const char *a, size_t n)
|
||||
{
|
||||
if (unlikely(!s)) {
|
||||
return talloc_strdup(NULL, a);
|
||||
return talloc_strndup(NULL, a, n);
|
||||
}
|
||||
|
||||
if (unlikely(!a)) {
|
||||
|
@ -1440,7 +1440,7 @@ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
|
|||
size_t slen;
|
||||
|
||||
if (unlikely(!s)) {
|
||||
return talloc_strdup(NULL, a);
|
||||
return talloc_strndup(NULL, a, n);
|
||||
}
|
||||
|
||||
if (unlikely(!a)) {
|
||||
|
|
Loading…
Reference in New Issue