]> granicus.if.org Git - php/commitdiff
Fix bug #2482 (xmlwriter_start_document chrashes apache)
authorRob Richards <rrichards@php.net>
Fri, 8 Oct 2004 14:54:15 +0000 (14:54 +0000)
committerRob Richards <rrichards@php.net>
Fri, 8 Oct 2004 14:54:15 +0000 (14:54 +0000)
Fix other function parameters
prep for release

ext/xmlwriter/package.xml
ext/xmlwriter/php_xmlwriter.c

index 98e6bc3c9ebc340f1ffd8cae2e7334ac163ec66a..58821bfbe3fc8cace511acc37e80e3aa3fe9a598 100644 (file)
    <role>lead</role>
   </maintainer>
  </maintainers>
+
  <release>
-  <version>0.1</version>
-  <date>2004-07-20</date>
+  <version>0.2</version>
+  <date>2004-10-08</date>
   <state>alpha</state>
-  <notes>Initial Release </notes>
-  <configureoptions>
-    <configureoption name="with-xmlwriter" default="autodetect" prompt="Include XMLWriter support?"/>
-  </configureoptions>
-  <filelist>
-   <file role="src" name="config.m4"/>
-   <file role="src" name="config.w32"/>
-   <file role="src" name="php_xmlwriter.c"/>
-   <file role="src" name="php_xmlwriter.h"/>
-  </filelist>
-  <deps>
-   <dep type="php" rel="ge" version="4.3.0" />
-  </deps>
+  <notes>Fix bug 2482 and other function parameters</notes>
  </release>
+
+ <changelog>
+  <release>
+   <version>0.1</version>
+   <date>2004-07-20</date>
+   <state>alpha</state>
+   <notes>Initial Release </notes>
+  </release>
+ </changelog>
+
+ <configureoptions>
+   <configureoption name="with-xmlwriter" default="autodetect" prompt="Include XMLWriter support?"/>
+ </configureoptions>
+ <filelist>
+  <file role="src" name="config.m4"/>
+  <file role="src" name="config.w32"/>
+  <file role="src" name="php_xmlwriter.c"/>
+  <file role="src" name="php_xmlwriter.h"/>
+ </filelist>
+ <deps>
+  <dep type="php" rel="ge" version="4.3.0" />
+ </deps>
 </package>
index 27eb44d8860adcf71c86fd59d71665616f6293e8..079924226770df9de7797923b0b5d49154402387 100644 (file)
@@ -776,10 +776,10 @@ PHP_FUNCTION(xmlwriter_start_document)
        zval *pind;
        xmlwriter_object *intern;
        xmlTextWriterPtr ptr;
-       char *version, *enc, *alone;
+       char *version = NULL, *enc = NULL, *alone = NULL;
        int version_len, enc_len, alone_len, retval;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &version, &version_len, &enc, &enc_len, &alone, &alone_len) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!s!s!", &pind, &version, &version_len, &enc, &enc_len, &alone, &alone_len) == FAILURE) {
                return;
        }
 
@@ -830,10 +830,10 @@ PHP_FUNCTION(xmlwriter_start_dtd)
        zval *pind;
        xmlwriter_object *intern;
        xmlTextWriterPtr ptr;
-       char *name, *pubid, *sysid;
+       char *name, *pubid = NULL, *sysid = NULL;
        int name_len, pubid_len, sysid_len, retval;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s!s!", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len) == FAILURE) {
                return;
        }
 
@@ -883,10 +883,10 @@ PHP_FUNCTION(xmlwriter_write_dtd)
        zval *pind;
        xmlwriter_object *intern;
        xmlTextWriterPtr ptr;
-       char *name, *pubid, *sysid, *subset;
+       char *name, *pubid = NULL, *sysid = NULL, *subset = NULL;
        int name_len, pubid_len, sysid_len, subset_len, retval;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len, &subset, &subset_len) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s!s!s!", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len, &subset, &subset_len) == FAILURE) {
                return;
        }
 
@@ -1099,7 +1099,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_entity)
        char *name;
        int name_len, isparm, retval;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len, &isparm) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsb", &pind, &name, &name_len, &isparm) == FAILURE) {
                return;
        }