summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-08 22:58:03 +0000
committerJim Meyering <jim@meyering.net>1998-01-08 22:58:03 +0000
commit03283b5000bbfb7bf0c7207d57b984a73777f58e (patch)
tree87e839ef93d0241a9b822b3c0f34eec3239cf9e2 /src
parent9f5dc7e7d06ece9a8408beaf6e92fd4f8efb6ef7 (diff)
downloadcoreutils-03283b5000bbfb7bf0c7207d57b984a73777f58e.tar.xz
(tac_stream): Don't perform arithmetic on now-void pointer
result of xrealloc (until recently it was char*).
Diffstat (limited to 'src')
-rw-r--r--src/tac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tac.c b/src/tac.c
index 2ff2f7f1b..95cd30a3e 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;