]> granicus.if.org Git - php/commitdiff
Fix crash from #7577 (torben@php.net)
authorStanislav Malyshev <stas@php.net>
Sun, 5 Nov 2000 16:25:26 +0000 (16:25 +0000)
committerStanislav Malyshev <stas@php.net>
Sun, 5 Nov 2000 16:25:26 +0000 (16:25 +0000)
ext/curl/curl.c

index d46c6b219058509d73daac93f2fbc2ecf97797bd..f9f85c4281b195d0ced81b8428817e470b84379e 100644 (file)
@@ -534,6 +534,10 @@ PHP_FUNCTION(curl_setopt)
                                        SEPARATE_ZVAL(current);
                                        convert_to_string_ex(current);
                                        
+                                       if (Z_STRLEN_PP(current) < 1) {
+                                               continue;
+                                       }
+
                                        indiv_command = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current));
                                        commands = curl_slist_append(commands, indiv_command);
                                        if (!commands) {