diff options
author | dim <dim@FreeBSD.org> | 2013-02-15 23:59:57 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-02-15 23:59:57 +0000 |
commit | f4e7f0ad5aa9c32f15ecce752dd7dc9e03765a1b (patch) | |
tree | 8416d1556b8767bbbc29bcd6ef58db4b95c8880a /usr.bin/mail | |
parent | cea4bd3ed0299c6d5120bceae68da5287ce5f6c5 (diff) | |
download | FreeBSD-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/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 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); } /* |