mirror of https://github.com/xiph/flac
Fix double free in iconvert code
This commit is contained in:
parent
eba4b6f63b
commit
b5c763d908
|
@ -161,6 +161,8 @@ int iconvert(const char *fromcode, const char *tocode,
|
|||
|
||||
/* Truncate the buffer to be tidy */
|
||||
utflen = ob - utfbuf;
|
||||
if (utflen == 0)
|
||||
goto fail;
|
||||
newbuf = realloc(utfbuf, utflen);
|
||||
if (!newbuf)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue