]> granicus.if.org Git - php/commitdiff
fix buffer overrun & segfault in get_meta_tags() when there is no tag value
authorAntony Dovgal <tony2001@php.net>
Fri, 10 Dec 2004 10:30:01 +0000 (10:30 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 10 Dec 2004 10:30:01 +0000 (10:30 +0000)
ext/standard/file.c

index 37a13ef0cd31a5715b05e85130b514d8c5905e06..a6bdddd3211a414a2f0014ca7762048f62c200c2 100644 (file)
@@ -432,7 +432,7 @@ PHP_FUNCTION(get_meta_tags)
                                if (have_content) {
                                        add_assoc_string(return_value, name, value, 0); 
                                } else {
-                                       add_assoc_string(return_value, name, "", 0);
+                                       add_assoc_string(return_value, name, "", 1);
                                }
 
                                efree(name);