mirror of
https://github.com/mirror/wget.git
synced 2025-01-13 13:50:23 +08:00
* src/iri.c (do_conversion): Initialize memory from realloc()
This commit is contained in:
parent
bb0aa299e9
commit
42c83d8972
@ -191,7 +191,13 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
|
||||
tooshort++;
|
||||
done = len;
|
||||
len = done + inlen * 2;
|
||||
s = xrealloc (s, len + 1);
|
||||
char *s_new = xrealloc (s, len + 1);
|
||||
if (s_new != s)
|
||||
{
|
||||
/* Help valgrind by initializing additional memory. */
|
||||
s = s_new;
|
||||
memset(s + done, 0, inlen * 2 + 1);
|
||||
}
|
||||
*out = s + done - outlen;
|
||||
outlen += inlen * 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user