You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/12/20 03:56:18 UTC
svn commit: r605796 - /httpd/mod_ftp/trunk/modules/ftp/ftp_message.c
Author: wrowe
Date: Wed Dec 19 18:56:15 2007
New Revision: 605796
URL: http://svn.apache.org/viewvc?rev=605796&view=rev
Log:
apr_cpystrn is always preferable
Submitted by: Takashi Sato <serai lans-tv.com>
Modified:
httpd/mod_ftp/trunk/modules/ftp/ftp_message.c
Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_message.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_message.c?rev=605796&r1=605795&r2=605796&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_message.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_message.c Wed Dec 19 18:56:15 2007
@@ -50,10 +50,7 @@
switch(*++inptr) {
case 'T':
apr_ctime(time_str, apr_time_now());
- strncpy(outptr, time_str, outlen);
- if (outlen > APR_CTIME_LEN - 1) {
- *(outptr + APR_CTIME_LEN - 1) = '\0';
- }
+ apr_cpystrn(outptr, time_str, outlen);
break;
case 'C':
apr_snprintf(outptr, outlen, "%s", fc->cwd);