/* tac - concatenate and print files in reverse
- Copyright (C) 1988-2012 Free Software Foundation, Inc.
+ Copyright (C) 1988-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
The source and destination regions probably overlap. */
memmove (G_buffer + read_size, G_buffer, saved_record_size);
past_end = G_buffer + read_size + saved_record_size;
- /* For non-regexp searches, avoid unneccessary scanning. */
+ /* For non-regexp searches, avoid unnecessary scanning. */
if (sentinel_length)
match_start = G_buffer + read_size;
else
G_buffer = xmalloc (G_buffer_size);
if (sentinel_length)
{
- strcpy (G_buffer, separator);
+ memcpy (G_buffer, separator, sentinel_length + 1);
G_buffer += sentinel_length;
}
else