summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-02-15 23:59:57 +0000
committerdim <dim@FreeBSD.org>2013-02-15 23:59:57 +0000
commitf4e7f0ad5aa9c32f15ecce752dd7dc9e03765a1b (patch)
tree8416d1556b8767bbbc29bcd6ef58db4b95c8880a /usr.bin
parentcea4bd3ed0299c6d5120bceae68da5287ce5f6c5 (diff)
downloadFreeBSD-src-f4e7f0ad5aa9c32f15ecce752dd7dc9e03765a1b.zip
FreeBSD-src-f4e7f0ad5aa9c32f15ecce752dd7dc9e03765a1b.tar.gz
Fix undefined behaviour in usr.bin/mail/util.c.
Reported by: deeptech71@gmail.com MFC after: 3 days
Diffstat (limited to 'usr.bin')
-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 4e3a0f6..b869fb0 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);
}
/*
OpenPOWER on IntegriCloud