diff options
author | Jim Meyering <jim@meyering.net> | 1998-01-08 22:58:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-01-08 22:58:03 +0000 |
commit | 03283b5000bbfb7bf0c7207d57b984a73777f58e (patch) | |
tree | 87e839ef93d0241a9b822b3c0f34eec3239cf9e2 /src | |
parent | 9f5dc7e7d06ece9a8408beaf6e92fd4f8efb6ef7 (diff) | |
download | coreutils-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |