From 448aa35f50f5a70c9c16aac1f8d4d64c270f6eef Mon Sep 17 00:00:00 2001 From: Richard Halkyard Date: Tue, 21 May 2019 16:06:47 -0500 Subject: [PATCH] Fix realloc() bug in gr65 The pointer to the input buffer was not being updated after a call to realloc(), causing the program to crash if realloc() moved the buffer. --- src/grc65/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grc65/main.c b/src/grc65/main.c index f6554eada..349b5c110 100644 --- a/src/grc65/main.c +++ b/src/grc65/main.c @@ -861,7 +861,7 @@ static char *filterInput (FILE *F, char *tbl) } if (a == EOF) { tbl[i] = '\0'; - xrealloc (tbl, i + 1); + tbl = xrealloc (tbl, i + 1); break; } if (IsSpace (a)) {