aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-02-15 23:59:57 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-02-15 23:59:57 +0000
commitca83b9753272a56a8c9e06c2fda743e8c2789427 (patch)
tree8416d1556b8767bbbc29bcd6ef58db4b95c8880a /usr.bin/mail
parent3cbc3249253e682577c931a1d7827c0a61c224ea (diff)
downloadsrc-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.c4
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);
}
/*