OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 22-Jan-2003 13:22:28
Branch: OPENPKG_1_1_SOLID Handle: 2003012212222700
Added files: (Branch: OPENPKG_1_1_SOLID)
openpkg-src/apache php.patch
Modified files: (Branch: OPENPKG_1_1_SOLID)
openpkg-src/apache apache.spec
Log:
SA-2003.005-php; CAN-2002-1396
Summary:
Revision Changes Path
1.81.2.5 +3 -1 openpkg-src/apache/apache.spec
1.1.2.1 +105 -0 openpkg-src/apache/php.patch
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/apache/apache.spec
============================================================================
$ cvs diff -u -r1.81.2.4 -r1.81.2.5 apache.spec
--- openpkg-src/apache/apache.spec 23 Oct 2002 12:20:41 -0000 1.81.2.4
+++ openpkg-src/apache/apache.spec 22 Jan 2003 12:22:27 -0000 1.81.2.5
@@ -143,7 +143,7 @@
Group: Web
License: ASF
Version: %{V_apache}
-Release: 1.1.2
+Release: 1.1.3
# list of sources
Source0: http://www.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
@@ -168,6 +168,7 @@
Source23: rc.apache
Patch0: apache.patch
Patch1: mod_ssl.patch
+Patch2: php.patch
# build information
Prefix: %{l_prefix}
@@ -331,6 +332,7 @@
%endif
%if "%{with_mod_php}" == "yes"
%setup3 -q -T -D -a 3
+ %patch2 -p0
%endif
%if "%{with_mod_dav}" == "yes"
%setup4 -q -T -D -a 4
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/apache/php.patch
============================================================================
$ cvs diff -u -r0 -r1.1.2.1 php.patch
--- /dev/null 2003-01-22 13:22:28.000000000 +0100
+++ php.patch 2003-01-22 13:22:28.000000000 +0100
@@ -0,0 +1,105 @@
+--- php-4.2.2/ext/standard/string.c.orig Wed Jan 22 10:10:45 2003
++++ php-4.2.2/ext/standard/string.c Wed Jan 22 11:40:13 2003
+@@ -616,7 +616,7 @@
+ {
+ const char *text, *breakchar = "\n";
+ char *newtext;
+- int textlen, breakcharlen = 1, newtextlen;
++ int textlen, breakcharlen = 1, newtextlen, alloced, chk;
+ long current = 0, laststart = 0, lastspace = 0;
+ long linelength = 75;
+ zend_bool docut = 0;
+@@ -642,38 +642,40 @@
+ for (current = 0; current < textlen; current++) {
+ if (text[current] == breakchar[0]) {
+ laststart = lastspace = current;
+- }
+- else if (text[current] == ' ') {
++ } else if (text[current] == ' ') {
+ if (current - laststart >= linelength) {
+ newtext[current] = breakchar[0];
+ laststart = current;
+ }
+ lastspace = current;
+- }
+- else if (current - laststart >= linelength
+- && laststart != lastspace) {
++ } else if (current - laststart >= linelength && laststart !=
lastspace) {
+ newtext[lastspace] = breakchar[0];
+ laststart = lastspace;
+ }
+ }
+
+ RETURN_STRINGL(newtext, textlen, 0);
+- }
+- else {
++ } else {
+ /* Multiple character line break or forced cut */
+ if (linelength > 0) {
+- newtextlen = textlen + (textlen/linelength + 1) * breakcharlen
+ 1;
+- }
+- else {
+- newtextlen = textlen * (breakcharlen + 1) + 1;
++ chk = (int)(textlen/linelength + 1);
++ alloced = textlen + chk * breakcharlen + 1;
++ } else {
++ chk = textlen;
++ alloced = textlen * (breakcharlen + 1) + 1;
+ }
+- newtext = emalloc(newtextlen);
++ newtext = emalloc(alloced);
+
+ /* now keep track of the actual new text length */
+ newtextlen = 0;
+
+ laststart = lastspace = 0;
+ for (current = 0; current < textlen; current++) {
++ if (chk <= 0) {
++ alloced += (int) (((textlen - current + 1)/linelength
+ 1) * breakcharlen) + 1;
++ newtext = erealloc(newtext, alloced);
++ chk = (int) ((textlen - current)/linelength) + 1;
++ }
+ /* when we hit an existing break, copy to new buffer, and
+ * fix up laststart and lastspace */
+ if (text[current] == breakchar[0]
+@@ -683,6 +685,7 @@
+ newtextlen += current-laststart+breakcharlen;
+ current += breakcharlen - 1;
+ laststart = lastspace = current + 1;
++ chk--;
+ }
+ /* if it is a space, check if it is at the line boundary,
+ * copy and insert a break, or just keep track of it */
+@@ -693,6 +696,7 @@
+ memcpy(newtext+newtextlen, breakchar,
breakcharlen);
+ newtextlen += breakcharlen;
+ laststart = current + 1;
++ chk--;
+ }
+ lastspace = current;
+ }
+@@ -706,6 +710,7 @@
+ memcpy(newtext+newtextlen, breakchar, breakcharlen);
+ newtextlen += breakcharlen;
+ laststart = lastspace = current;
++ chk--;
+ }
+ /* if the current word puts us over the linelength, copy
+ * back up until the last space, insert a break, and move
+@@ -717,6 +722,7 @@
+ memcpy(newtext+newtextlen, breakchar, breakcharlen);
+ newtextlen += breakcharlen;
+ laststart = lastspace = lastspace + 1;
++ chk--;
+ }
+ }
+
+@@ -727,6 +733,8 @@
+ }
+
+ newtext[newtextlen] = '\0';
++ /* free unused memory */
++ newtext = erealloc(newtext, newtextlen+1);
+
+ RETURN_STRINGL(newtext, newtextlen, 0);
+ }
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]