projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48db0d6
)
(idna_to_unicode_4z4z): Fix test for failed memory allocation.
author
Ulrich Drepper
<drepper@redhat.com>
Fri, 21 May 2004 15:42:30 +0000
(15:42 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Fri, 21 May 2004 15:42:30 +0000
(15:42 +0000)
libidn/idna.c
patch
|
blob
|
history
diff --git
a/libidn/idna.c
b/libidn/idna.c
index
81e92f7
..
cf95291
100644
(file)
--- a/
libidn/idna.c
+++ b/
libidn/idna.c
@@
-115,9
+115,11
@@
idna_to_ascii_4i (const uint32_t * in, size_t inlen, char *out, int flags)
len = strlen (p);
do
{
+ char *newp;
+
len = 2 * len + 10; /* XXX better guess? */
-
char *
newp = realloc (p, len);
- if (p == NULL)
+ newp = realloc (p, len);
+ if (
new
p == NULL)
{
free (p);
return IDNA_MALLOC_ERROR;