]> granicus.if.org Git - apache/commitdiff
No need to use strcpy() where a ptr assignment is ok
authorMartin Kraemer <martin@apache.org>
Tue, 29 Jan 2002 09:09:47 +0000 (09:09 +0000)
committerMartin Kraemer <martin@apache.org>
Tue, 29 Jan 2002 09:09:47 +0000 (09:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93072 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index ceb8bc517db8de613d21596f5a62b3f64a091fca..42d978cea8ec2dced51c3538ef1f1fc3ebfa8551 100644 (file)
@@ -3144,8 +3144,8 @@ static void rewritelog(request_rec *r, int level, const char *text, ...)
     char *str1;
     char str2[512];
     char str3[1024];
-    char type[20];
-    char redir[20];
+    char *type;
+    char redir[20]; /* enough for "/redir#%d" if int is 32 bit */
     va_list ap;
     int i;
     apr_size_t nbytes;
@@ -3194,10 +3194,10 @@ static void rewritelog(request_rec *r, int level, const char *text, ...)
     apr_vsnprintf(str2, sizeof(str2), text, ap);
 
     if (r->main == NULL) {
-        strcpy(type, "initial");
+        type = "initial";
     }
     else {
-        strcpy(type, "subreq");
+        type = "subreq";
     }
 
     for (i = 0, req = r; req->prev != NULL; req = req->prev) {