commit | 87fbe12dbba8278d58d6581626e4cf4224dbca8d | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Sat Dec 13 11:56:41 2014 -0600 |
committer | Rob Landley <rob@landley.net> | Sat Dec 13 11:56:41 2014 -0600 |
tree | a66a18b46f95386e75d98f40eeb46dc08d995ad7 | |
parent | e75b1d8d96ea104e5f4fa3f7d06e289cbbedc435 [diff] |
Remove more strncpy() calls. The semantics of strncat() and strncpy() are non-obvious, so let's not use 'em. Both zero all their remaining buffer space, and with strncat() the size is the space left at the _end_ of the string (not the size of the buffer) so it's way too easy to stomp memory you don't own. As long as we have to measure stuff ourselves to get it right, just use memcpy().