You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Elliott Martin <el...@london.codemasters.com> on 1998/07/15 12:57:46 UTC

mod_rewrite/2621: strcat() on line 3197 does not take four parameters.

>Number:         2621
>Category:       mod_rewrite
>Synopsis:       strcat() on line 3197 does not take four parameters.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Jul 15 04:00:00 PDT 1998
>Last-Modified:
>Originator:     elliott@london.codemasters.com
>Organization:
apache
>Release:        1.3.0
>Environment:
Win95/NT VC++ 5.0
>Description:
strcat() on line 3197 of mod_rewrite.c is programmed to take four parameters.  Under Microsoft C strcat() can only take two parameters.
>How-To-Repeat:
Compile the file using VC++ 5.0
>Fix:
I know a fix has been suggested for this using strcat() twice to successively concatenate the strings on top of each other, but I think it would be neater (and possibly more efficient) to use sprintf() instead:

sprintf(pCommand, "%s /C %s", SHELL_PATH, cmd);

This keeps it all in one statement on one line and (possibly) reduces run-time overhead very slightly (excuse me if the only advantage is programming style). :o)
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]