randy 96/12/24 11:53:06
Modified: src CHANGES mod_include.c Log: find_string() dereferences a NULL pointer when printing during an error. Reviewed by: Chuck Murcko, Randy Terbush Submitted by: Howard Fear Revision Changes Path 1.100 +2 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.99 retrieving revision 1.100 diff -C3 -r1.99 -r1.100 *** CHANGES 1996/12/24 19:43:47 1.99 --- CHANGES 1996/12/24 19:53:04 1.100 *************** *** 1,5 **** --- 1,7 ---- Changes with Apache 1.2b3: + *) Fix find_string() NULL pointer dereference. [Howard Fear] + *) Add set_flag_slot() at the request of Dirk and others. [Dirk vanGulik] 1.19 +6 -8 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C3 -r1.18 -r1.19 *** mod_include.c 1996/12/09 04:54:22 1.18 --- mod_include.c 1996/12/24 19:53:04 1.19 *************** *** 141,153 **** return 0; } else { ! if(r) { ! if(p) { ! for(x=0;x<p;x++) { ! if (printing) rputc(str[x],r); ! } } ! if (printing) rputc(c,r); } p=0; } --- 141,151 ---- return 0; } else { ! if (printing) { ! for(x=0;x<p;x++) { ! rputc(str[x],r); } ! rputc(c,r); } p=0; } *************** *** 1590,1596 **** log_printf(r->server,"httpd: exec used but not allowed in %s", r->filename); if (printing) rputs(error, r); ! ret = find_string(f,ENDING_SEQUENCE,NULL,printing); } else ret=handle_exec(f, r, error); } else if(!strcmp(directive,"config")) --- 1588,1594 ---- log_printf(r->server,"httpd: exec used but not allowed in %s", r->filename); if (printing) rputs(error, r); ! ret = find_string(f,ENDING_SEQUENCE,r,0); } else ret=handle_exec(f, r, error); } else if(!strcmp(directive,"config")) *************** *** 1612,1618 **** "httpd: unknown directive %s in parsed doc %s", directive,r->filename); if (printing) rputs(error, r); ! ret=find_string(f,ENDING_SEQUENCE,NULL,printing); } if(ret) { log_printf(r->server,"httpd: premature EOF in parsed file %s", --- 1610,1616 ---- "httpd: unknown directive %s in parsed doc %s", directive,r->filename); if (printing) rputs(error, r); ! ret=find_string(f,ENDING_SEQUENCE,r,0); } if(ret) { log_printf(r->server,"httpd: premature EOF in parsed file %s",