From f04e1a6d1f3cecc041a2495430a960a931bd1d5b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 24 Aug 2013 17:27:43 -0700 Subject: Bug 68413 - [Bisected]Error in `xterm': realloc(): invalid next size Pass *new* size to realloc, not old size. Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/imLcPrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/lib/X11/imLcPrs.c b/nx-X11/lib/X11/imLcPrs.c index 7745c53d2..afc947468 100644 --- a/nx-X11/lib/X11/imLcPrs.c +++ b/nx-X11/lib/X11/imLcPrs.c @@ -644,7 +644,7 @@ parseline( } while (b->utf8used + l + 1 > b->utf8size) { DTCharIndex newsize = b->utf8size ? b->utf8size * 1.5 : 1024; - char *newutf8 = Xrealloc (b->utf8, b->utf8size); + char *newutf8 = Xrealloc (b->utf8, newsize); if (newutf8 == NULL) goto error; b->utf8 = newutf8; -- cgit v1.2.3