From: Jim Meyering Date: Thu, 8 Jan 1998 22:58:03 +0000 (+0000) Subject: (tac_stream): Don't perform arithmetic on now-void pointer X-Git-Tag: FILEUTILS-3_16k~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03283b5000bbfb7bf0c7207d57b984a73777f58e;p=thirdparty%2Fcoreutils.git (tac_stream): Don't perform arithmetic on now-void pointer result of xrealloc (until recently it was char*). --- diff --git a/src/tac.c b/src/tac.c index 2ff2f7f1bc..95cd30a3e1 100644 --- a/src/tac.c +++ b/src/tac.c @@ -312,7 +312,8 @@ tac_stream (FILE *in, const char *file) read_size *= 2; G_buffer_size = read_size * 2 + sentinel_length + 2; - newbuffer = xrealloc (G_buffer - offset, G_buffer_size) + offset; + newbuffer = xrealloc (G_buffer - offset, G_buffer_size); + newbuffer += offset; /* Adjust the pointers for the new buffer location. */ match_start += newbuffer - G_buffer; past_end += newbuffer - G_buffer;