Do some valgrind cleanup

Joerg Scheurich reported that there's a buffer overflow in readin() for
long path component names. He's not wrong.

When fixing that, and then checking there's nothing else obviously wrong
with valgrind, I also noticed it complains about overlapping strcpy().

So add a hacky version of strscpy(), which (a) handles overlapping, and
(b) has the proper strscpy() semantics.

Just say no to strncpy and strlcpy, both of which are terminally broken

And stop stripping the binary.  The time when the size of the uemacs
binary was a big deal is long past, and it made valgrind harder.

Reported-by: Joerg Scheurich <>
Signed-off-by: Linus Torvalds <>
7 files changed