This was flagged on CheriBSD on ARM Morello with the error:
"In-address space security exception (core dumped)"
triggered with: tac -s '' /dev/null
* src/tac.c (main): Ensure we don't read beyond the
end of the supplied optarg.
G_buffer = xmalloc (G_buffer_size);
if (sentinel_length)
{
- memcpy (G_buffer, separator, sentinel_length + 1);
+ memcpy (G_buffer, separator, sentinel_length + !!*separator);
G_buffer += sentinel_length;
}
else