cvs: php4 /ext/standard string.c

From: Date: Wed, 27 Mar 2002 20:20:57 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10725@lists.php.net to get a copy of this message
hholzgra Wed Mar 27 15:20:57 2002 EDT Modified files: /php4/ext/standard string.c Log: fix for Bug #16314 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.267 php4/ext/standard/string.c:1.268 --- php4/ext/standard/string.c:1.267 Tue Mar 26 02:57:07 2002 +++ php4/ext/standard/string.c Wed Mar 27 15:20:57 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.267 2002/03/26 07:57:07 mfischer Exp $ */ +/* $Id: string.c,v 1.268 2002/03/27 20:20:57 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2120,9 +2120,6 @@ int l; char escape_char='\\'; - if (PG(magic_quotes_sybase)) { - escape_char='\''; - } if (len != NULL) { l = *len; @@ -2131,6 +2128,25 @@ } s = str; t = str; + + if (PG(magic_quotes_sybase)) { + while (l >= 0) { + if(*t=='\'') { + if((l>0) && (t[1]=='\'')) { + t++; + if (len != NULL) + (*len)--; + l--; + } + } + *s++ = *t++; + l--; + } + *s = '\0'; + + return; + } + while (l > 0) { if (*t == escape_char) { t++; /* skip the slash */

« previous php.cvs (#10725) next »