You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2016/06/20 21:08:43 UTC

svn commit: r1749403 - /httpd/httpd/trunk/modules/filters/sed1.c

Author: jailletc36
Date: Mon Jun 20 21:08:43 2016
New Revision: 1749403

URL: http://svn.apache.org/viewvc?rev=1749403&view=rev
Log:
Use 'memcpy' instead of 'strcpy' when the size of the string has already been computed.

Modified:
    httpd/httpd/trunk/modules/filters/sed1.c

Modified: httpd/httpd/trunk/modules/filters/sed1.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/sed1.c?rev=1749403&r1=1749402&r2=1749403&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/sed1.c (original)
+++ httpd/httpd/trunk/modules/filters/sed1.c Mon Jun 20 21:08:43 2016
@@ -196,7 +196,7 @@ static void append_to_holdbuf(sed_eval_t
     if (eval->hsize <= reqsize) {
         grow_hold_buffer(eval, reqsize);
     }
-    strcpy(eval->hspend, sz);
+    memcpy(eval->hspend, sz, len + 1);
     /* hspend will now point to NULL character */
     eval->hspend += len;
 }
@@ -220,7 +220,7 @@ static void append_to_genbuf(sed_eval_t
     if (eval->gsize < reqsize) {
         grow_gen_buffer(eval, reqsize, gspend);
     }
-    strcpy(*gspend, sz);
+    memcpy(*gspend, sz, len + 1);
     /* *gspend will now point to NULL character */
     *gspend += len;
 }