aboutsummaryrefslogtreecommitdiff
path: root/util.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do some valgrind cleanupLinus Torvalds2018-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | 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 interfaces. 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 <mufti11@web.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Add ARRAY_SIZE macro so we can get rid of some hard coded calculations.Thiago Farina2010-06-081-0/+6
Signed-off-by: Thiago Farina <thiago.farina@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>