Commit 606fdfca authored by Miroslav Lichvar's avatar Miroslav Lichvar Committed by Erik de Castro Lopo
Browse files

metaflac : Fix local_strcat() to terminate string correctly.

The NUL char is written at incorrect place when the destination string
is longer than 0, which causes memory corruption. It was broken by
commit 2d6354ff

Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <>
parent d42c0426
......@@ -75,7 +75,7 @@ void local_strcat(char **dest, const char *source)
*dest = safe_realloc_add_3op_(*dest, ndest, /*+*/nsource, /*+*/1);
if(0 == *dest)
die("out of memory growing string");
safe_strncpy((*dest)+ndest, source, ndest + nsource + 1);
safe_strncpy((*dest)+ndest, source, nsource + 1);
static inline int local_isprint(int c)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment