>Number: 1234
>Category: mod_rewrite
>Synopsis: Improper statck variable initialization in mod_rewrite
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Wed Oct 15 15:20:01 PDT 1997
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.1 up to 1.2.4
>Environment:
SGI IRIX 6.2 6.3 6.4
I believe the problem is platform-independent
>Description:
> In file mod_rewrite.c
>
> static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p, char
> *perdir)
> {
> char *uri;
> char *output;
> int flags;
> char newuri[MAX_STRING_LEN];
> char port[32];
> regex_t *regexp;
> regmatch_t regmatch[10]; <====
>
> should be changed to:
>
> regmatch_t regmatch[10] = {0,0};
>
> Otherwise, you get random garbage off the stack.
We find that the server would segv under some conditions, depending
on what happened to be on the stack.
>How-To-Repeat:
>Fix:
see above
>Audit-Trail:
>Unformatted: