From nobody@hyperreal.com Mon Jan 27 14:10:20 1997 Received: by taz.hyperreal.com (8.8.4/V2.0) id OAA14657; Mon, 27 Jan 1997 14:10:20 -0800 (PST) Message-Id: <199701272210.OAA14657@taz.hyperreal.com> Date: Mon, 27 Jan 1997 14:10:20 -0800 (PST) From: Paul van der Zwan Reply-To: paulz@olivetti.nl To: apbugs@hyperreal.com Subject: mod_info print config wrong X-Send-Pr-Version: 3.2 >Number: 132 >Category: mod_info >Synopsis: mod_info print config wrong >Confidential: no >Severity: serious >Priority: medium >Responsible: marc >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Jan 27 14:20:01 1997 >Last-Modified: Mon Jan 27 17:24:02 PST 1997 >Originator: paulz@olivetti.nl >Organization: >Release: 1.2b6 >Environment: www.apache.org server >Description: When printing type config information mod info prints wrong text >How-To-Repeat: Look the access.conf based entries you get on http://www.apache.org/serv-info >Fix: >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: marc State-Changed-When: Mon Jan 27 14:42:41 PST 1997 State-Changed-Why: Known problem. Will fix in source tree tonight. Responsible-Changed-From-To: gnats-admin (GNATS administrator)-marc Responsible-Changed-By: marc Responsible-Changed-When: Mon Jan 27 14:42:41 PST 1997 Responsible-Changed-Why: I'll commit the fix, if no one beats me to it State-Changed-From-To: analyzed-closed State-Changed-By: marc State-Changed-When: Mon Jan 27 17:23:13 PST 1997 State-Changed-Why: Fixed in revision 1.12 of mod_info. Patch included. >Unformatted: Index: mod_info.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_info.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** mod_info.c 1997/01/26 01:16:17 1.11 --- mod_info.c 1997/01/28 01:03:06 1.12 *************** *** 89,107 **** char *mod_info_html_cmd_string(char *string) { char *s,*t; static char ret[256]; /* What is the max size of a command? */ ret[0]='\0'; s = string; t=ret; ! while((*s) && (strlen(t) < 256)) { if(*s=='<') { ! strncat(t,"<", sizeof(ret)-strlen(ret)); t+=4*sizeof(char); } else if(*s=='>') { ! strncat(t,">", sizeof(ret)-strlen(ret)); t+=4*sizeof(char); } - else *t++=*s; s++; } *t='\0'; --- 89,113 ---- char *mod_info_html_cmd_string(char *string) { char *s,*t; static char ret[256]; /* What is the max size of a command? */ + char *end_ret; ret[0]='\0'; s = string; t=ret; ! end_ret = t + sizeof(ret); ! while((*s) && ((t-ret) < sizeof(ret))) { if(*s=='<') { ! strncpy(t,"<", end_ret - t); t+=4*sizeof(char); } else if(*s=='>') { ! strncpy(t,">", end_ret - t); t+=4*sizeof(char); + } else if(*s=='&') { + strncpy(t,"&", end_ret - t); + t+=5*sizeof(char); + } else { + *t++=*s; } s++; } *t='\0';