rse 99/03/10 03:06:12
Modified: src CHANGES Makefile.tmpl src/main http_main.c Log: Link the shared core bootstrap program (``SHARED_CORE'') also against libap.a and use it's ap_snprintf() instead of sprintf() to avoid possible buffer overflows. Hint given by: John Bley <[EMAIL PROTECTED]> Submitted by: Ralf S. Engelschall Revision Changes Path 1.1270 +4 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1269 retrieving revision 1.1270 diff -u -r1.1269 -r1.1270 --- CHANGES 1999/03/10 10:34:00 1.1269 +++ CHANGES 1999/03/10 11:06:06 1.1270 @@ -1,5 +1,9 @@ Changes with Apache 1.3.5 + *) Link the shared core bootstrap program (``Rule SHARED_CORE=yes'') also + against libap.a and use its ap_snprintf() instead of sprintf() to avoid + possible buffer overflows. [Ralf S. Engelschall] + *) Remove no longer used non-API function ap_single_module_init(). [Ralf S. Engelschall] 1.109 +1 -1 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.108 retrieving revision 1.109 diff -u -r1.108 -r1.109 --- Makefile.tmpl 1999/01/06 21:57:02 1.108 +++ Makefile.tmpl 1999/03/10 11:06:07 1.109 @@ -35,7 +35,7 @@ target_shared: lib$(TARGET).ep $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ - -o $(TARGET) -DSHARED_CORE_BOOTSTRAP main/http_main.c + -o $(TARGET) -DSHARED_CORE_BOOTSTRAP main/http_main.c ap/libap.a lib$(TARGET).ep: lib$(TARGET).$(SHLIB_SUFFIX_NAME) $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ 1.426 +3 -3 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.425 retrieving revision 1.426 diff -u -r1.425 -r1.426 --- http_main.c 1999/03/08 15:44:00 1.425 +++ http_main.c 1999/03/10 11:06:10 1.426 @@ -6101,7 +6101,7 @@ /* * create path to SHARED_CORE_EXECUTABLE_PROGRAM */ - sprintf(prog, "%s/%s", llp_dir, SHARED_CORE_EXECUTABLE_PROGRAM); + ap_snprintf(prog, sizeof(prog), "%s/%s", llp_dir, SHARED_CORE_EXECUTABLE_PROGRAM); /* * adjust process environment therewith the Unix loader @@ -6127,9 +6127,9 @@ envp[i] = NULL; } if (llp_existing != NULL) - sprintf(llp_buf, "%s=%s:%s", VARNAME, llp_dir, llp_existing); + ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s:%s", VARNAME, llp_dir, llp_existing); else - sprintf(llp_buf, "%s=%s", VARNAME, llp_dir); + ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s", VARNAME, llp_dir); *llp_slot = strdup(llp_buf); /*