]> granicus.if.org Git - php/commitdiff
Fixed zend_u_strtod() that returned uninitialized value in case of empty string
authorDmitry Stogov <dmitry@php.net>
Wed, 15 Mar 2006 13:12:32 +0000 (13:12 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 15 Mar 2006 13:12:32 +0000 (13:12 +0000)
Zend/zend_strtod.c

index bdc5daab537dfd7e878a2311d1541e8831a7c7d1..f0a89b50a066116828fc3f9b92d3820fdf3d36bd 100644 (file)
@@ -1800,7 +1800,7 @@ zend_strtod
 /* UTODO: someone can reimplement this using the code above, if they really want to. */
 ZEND_API double zend_u_strtod(const UChar *nptr, UChar **endptr)
 {
-       double value;
+       double value = 0.0;
        int32_t num_conv = 0, num_read = 0;
 
        num_conv = u_sscanf(nptr, "%f%n", &value, &num_read);