]> granicus.if.org Git - php/commitdiff
BUGFIX: close string with smart_str_0()
authorDmitry Stogov <dmitry@php.net>
Fri, 9 Jan 2004 16:35:04 +0000 (16:35 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 9 Jan 2004 16:35:04 +0000 (16:35 +0000)
ext/soap/php_http.c
ext/soap/soap.c

index 41bc85ec9580e4ff30372dc67c505cb31fdc0592..5d7415b5b0db8ba9b2a06fe37ffe5b7d2cbe3bf2 100644 (file)
@@ -163,6 +163,7 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *soapaction TSRMLS_
                        if(zend_hash_find(Z_OBJPROP_P(this_ptr), "_password", sizeof("_password"), (void **)&password) == SUCCESS) {
                                smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
                        }
+                       smart_str_0(&auth);
                        buf = php_base64_encode(auth.c, auth.len, &len);
                        smart_str_append_const(&soap_headers, "Authorization: Basic ");
                        smart_str_appendl(&soap_headers, buf, len);
@@ -194,6 +195,7 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *soapaction TSRMLS_
                smart_str_append_const(&soap_headers, "\r\n");
 
                smart_str_appendl(&soap_headers, buf, buf_size);
+               smart_str_0(&soap_headers);
 
                err = php_stream_write(stream, soap_headers.c, soap_headers.len);
                if(err != soap_headers.len) {
index a46bc23a08588a1f0c084685b53b10d9d1f86702..f34984d7d42607f13baec6ca7f1ed0c24a207b50 100644 (file)
@@ -2215,6 +2215,7 @@ static void function_to_string(sdlFunctionPtr function, smart_str *buf)
                }
        }
        smart_str_appendc(buf, ')');
+       smart_str_0(buf);
 }
 
 static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
@@ -2257,6 +2258,7 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
                smart_str_appendl(buf, ";\n", 2);
        }
        smart_str_free(&spaces);
+       smart_str_0(buf);
 }
 
 /* Deletes */