cvs: /php4/ext/standard file.c string.c /php4/ext/zlib zlib.c
| From: | Rasmus Lerdorf | Date: | Tue, 21 Sep 1999 17:50:52 +0000 |
| Subject: | cvs: /php4/ext/standard file.c string.c /php4/ext/zlib zlib.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4759@lists.php.net to get a copy of this message | ||
rasmus Tue Sep 21 13:50:52 1999 EDT
Modified files:
/php4/ext/standard file.c string.c
/php4/ext/zlib zlib.c
Log:
fgetss/gzgetss fixes
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.32 php4/ext/standard/file.c:1.33
--- php4/ext/standard/file.c:1.32 Mon Sep 20 16:05:26 1999
+++ php4/ext/standard/file.c Tue Sep 21 13:50:50 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.32 1999/09/20 20:05:26 eschmid Exp $ */
+/* $Id: file.c,v 1.33 1999/09/21 17:50:50 rasmus Exp $ */
/* Synced with php3 revision 1.218 1999-06-16 [ssb] */
@@ -973,7 +973,8 @@
RETURN_FALSE;
}
- _php3_strip_tags(buf, len, fgetss_state, allow->value.str.val);
+ /* strlen() can be used here since we are doing it on the return of an fgets() anyway */
+ _php3_strip_tags(buf, strlen(buf), fgetss_state, allow?allow->value.str.val:NULL);
RETURN_STRING(buf, 0);
}
/* }}} */
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.41 php4/ext/standard/string.c:1.42
--- php4/ext/standard/string.c:1.41 Tue Sep 21 13:06:30 1999
+++ php4/ext/standard/string.c Tue Sep 21 13:50:51 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.41 1999/09/21 17:06:30 andrey Exp $ */
+/* $Id: string.c,v 1.42 1999/09/21 17:50:51 rasmus Exp $ */
/* Synced with php3 revision 1.193 1999-06-16 [ssb] */
@@ -1789,7 +1789,7 @@
}
convert_to_string(str);
buf = estrdup(str->value.str.val);
- _php3_strip_tags(buf, str->value.str.len, 0, allow->value.str.val);
+ _php3_strip_tags(buf, str->value.str.len, 0, allow?allow->value.str.val:NULL);
RETURN_STRING(buf, 0);
}
/* }}} */
Index: php4/ext/zlib/zlib.c
diff -u php4/ext/zlib/zlib.c:1.18 php4/ext/zlib/zlib.c:1.19
--- php4/ext/zlib/zlib.c:1.18 Mon Sep 20 20:21:01 1999
+++ php4/ext/zlib/zlib.c Tue Sep 21 13:50:51 1999
@@ -16,7 +16,7 @@
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.18 1999/09/21 00:21:01 rasmus Exp $ */
+/* $Id: zlib.c,v 1.19 1999/09/21 17:50:51 rasmus Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -518,7 +518,8 @@
RETURN_FALSE;
}
- _php3_strip_tags(buf, len, ZLIBG(gzgetss_state), allow->value.str.val);
+ /* strlen() can be used here since we are doing it on the return of an fgets() anyway */
+ _php3_strip_tags(buf, strlen, ZLIBG(gzgetss_state), allow?allow->value.str.val:NULL);
RETURN_STRING(buf, 0);
}