diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-02-15 23:59:57 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-02-15 23:59:57 +0000 |
commit | ca83b9753272a56a8c9e06c2fda743e8c2789427 (patch) | |
tree | 8416d1556b8767bbbc29bcd6ef58db4b95c8880a /usr.bin/mail | |
parent | 3cbc3249253e682577c931a1d7827c0a61c224ea (diff) | |
download | src-ca83b9753272a56a8c9e06c2fda743e8c2789427.tar.gz src-ca83b9753272a56a8c9e06c2fda743e8c2789427.zip |
Fix undefined behaviour in usr.bin/mail/util.c.
Reported by: deeptech71@gmail.com
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=246860
Diffstat (limited to 'usr.bin/mail')
-rw-r--r-- | usr.bin/mail/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c index 4e3a0f6dde93..b869fb0a3e83 100644 --- a/usr.bin/mail/util.c +++ b/usr.bin/mail/util.c @@ -236,8 +236,8 @@ istrncpy(char *dest, const char *src, size_t dsize) { strlcpy(dest, src, dsize); - while (*dest) - *dest++ = tolower((unsigned char)*dest); + for (; *dest; dest++) + *dest = tolower((unsigned char)*dest); } /* |