cvs: pecl /tidy tidy.c
| From: | John Coggeshall | Date: | Fri, 01 Aug 2003 09:48:06 +0000 |
| Subject: | cvs: pecl /tidy tidy.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-391@lists.php.net to get a copy of this message | ||
john Fri Aug 1 05:48:06 2003 EDT
Modified files:
/pecl/tidy tidy.c
Log:
Segfault fix.
Index: pecl/tidy/tidy.c
diff -u pecl/tidy/tidy.c:1.2 pecl/tidy/tidy.c:1.3
--- pecl/tidy/tidy.c:1.2 Fri Aug 1 05:12:35 2003
+++ pecl/tidy/tidy.c Fri Aug 1 05:48:06 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.2 2003/08/01 09:12:35 john Exp $ */
+/* $Id: tidy.c,v 1.3 2003/08/01 09:48:06 john Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -344,6 +344,7 @@
PHP_FUNCTION(tidy_parse_string) {
char *input;
+ int input_len;
zval *res;
PHPTidyDoc *tdoc;
@@ -352,7 +353,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rs", &res, &input) == FAILURE) {
+ "rs", &res, &input, &input_len) == FAILURE) {
return;
}
@@ -441,6 +442,7 @@
char *inputfile;
+ int input_len;
zval *res;
PHPTidyDoc *tdoc;
php_stream *stream;
@@ -451,7 +453,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rs", &res, &inputfile) == FAILURE) {
+ "rs", &res, &inputfile, &input_len) == FAILURE)
{
return;
}
@@ -757,6 +759,7 @@
PHP_FUNCTION(tidy_load_config) {
zval *res;
char *filename;
+ int filename_len;
PHPTidyDoc *tdoc;
if(ZEND_NUM_ARGS() != 2) {
@@ -764,7 +767,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rs", &res, &filename) == FAILURE) {
+ "rs", &res, &filename, &filename_len) ==
FAILURE) {
return;
}
@@ -782,6 +785,7 @@
zval *res;
char *filename;
char *encoding;
+ int enc_len, file_len;
PHPTidyDoc *tdoc;
if(ZEND_NUM_ARGS() != 2) {
@@ -789,7 +793,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rss", &res, &filename, &encoding) == FAILURE) {
+ "rss", &res, &filename, &file_len,
&encoding, &enc_len) == FAILURE) {
return;
}
@@ -810,6 +814,7 @@
PHP_FUNCTION(tidy_set_encoding) {
zval *res;
char *encoding;
+ int enc_len;
PHPTidyDoc *tdoc;
if(ZEND_NUM_ARGS() != 2) {
@@ -817,7 +822,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rs", &res, &encoding) == FAILURE) {
+ "rs", &res, &encoding, &enc_len) == FAILURE) {
return;
}
@@ -836,6 +841,7 @@
PHP_FUNCTION(tidy_save_config) {
zval *res;
char *filename;
+ int file_len;
PHPTidyDoc *tdoc;
if(ZEND_NUM_ARGS() != 2) {
@@ -843,7 +849,7 @@
}
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "rs", &res, &filename) == FAILURE) {
+ "rs", &res, &filename, &file_len) == FAILURE) {
return;
}