aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/lcDB.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/lcDB.c b/nx-X11/lib/X11/lcDB.c
index 027d7747b..cb509d273 100644
--- a/nx-X11/lib/X11/lcDB.c
+++ b/nx-X11/lib/X11/lcDB.c
@@ -210,11 +210,12 @@ realloc_parse_info(
int len)
{
char *p;
+ int newsize = BUFSIZE * ((parse_info.bufsize + len)/BUFSIZE + 1);
- parse_info.bufMaxSize = BUFSIZE * ((parse_info.bufsize + len)/BUFSIZE + 1);
- p = (char *)Xrealloc(parse_info.buf, parse_info.bufMaxSize);
+ p = Xrealloc(parse_info.buf, newsize);
if (p == NULL)
return False;
+ parse_info.bufMaxSize = newsize;
parse_info.buf = p;
return True;