dgaudet 98/05/11 10:49:21
Modified: src/ap ap_snprintf.c Log: Martin found the core dumping bug... it was my fault. psprintf() could possibly set curpos == endpos + 1... and the old test for sp == bep would never find this case. As a result it would waltz past the end of a block. When I wrote the "sp == bep" thing I thought "it's the caller's responsibility to guarantee this!" ... er, program defensively Dean, it doesn't cost any more in this case. Revision Changes Path 1.24 +1 -1 apache-1.3/src/ap/ap_snprintf.c Index: ap_snprintf.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/ap/ap_snprintf.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ap_snprintf.c 1998/05/07 13:13:53 1.23 +++ ap_snprintf.c 1998/05/11 17:49:21 1.24 @@ -269,7 +269,7 @@ */ #define INS_CHAR(c, sp, bep, cc) \ { \ - if (sp == bep) { \ + if (sp >= bep) { \ vbuff->curpos = sp; \ if (flush_func(vbuff)) \ return -1; \