Xin LI <[EMAIL PROTECTED]> writes: > Modified: head/lib/libutil/login_times.c > ============================================================================== > --- head/lib/libutil/login_times.c Fri Oct 17 21:14:50 2008 > (r183988) > +++ head/lib/libutil/login_times.c Fri Oct 17 21:21:14 2008 > (r183989) > @@ -72,8 +72,7 @@ parse_lt(const char * str) > char buf[64]; > > /* Make local copy and force lowercase to simplify parsing */ > - p = strncpy(buf, str, sizeof buf); > - buf[sizeof buf - 1] = '\0'; > + p = strlcpy(buf, str, sizeof buf); > for (i = 0; buf[i]; i++) > buf[i] = (char)tolower(buf[i]);
This makes absolutely no sense: strncpy() and strlcpy() have different return types. The existing code was safe and worked just fine; why break it? DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"
