Author: dim
Date: Fri Feb 15 23:59:57 2013
New Revision: 246860
URL: http://svnweb.freebsd.org/changeset/base/246860

Log:
  Fix undefined behaviour in usr.bin/mail/util.c.
  
  Reported by:  deeptec...@gmail.com
  MFC after:    3 days

Modified:
  head/usr.bin/mail/util.c

Modified: head/usr.bin/mail/util.c
==============================================================================
--- head/usr.bin/mail/util.c    Fri Feb 15 23:41:47 2013        (r246859)
+++ head/usr.bin/mail/util.c    Fri Feb 15 23:59:57 2013        (r246860)
@@ -236,8 +236,8 @@ istrncpy(char *dest, const char *src, si
 {
 
        strlcpy(dest, src, dsize);
-       while (*dest)
-               *dest++ = tolower((unsigned char)*dest);
+       for (; *dest; dest++)
+               *dest = tolower((unsigned char)*dest);
 }
 
 /*
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to