]> granicus.if.org Git - php/commitdiff
fix coverity issue #262 (uninitialized variable)
authorAntony Dovgal <tony2001@php.net>
Thu, 19 Oct 2006 10:01:54 +0000 (10:01 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 19 Oct 2006 10:01:54 +0000 (10:01 +0000)
ext/json/json.c

index b57129b1e07b78884508c4b5b5e1fbb0773b833f..6f4571241d1727b33352e2007bae3465e28b4d24 100644 (file)
@@ -439,6 +439,7 @@ PHP_FUNCTION(json_decode)
 
        if (str_type == IS_UNICODE) {
                utf16 = str.u;
+               utf16_len = str_len;
        } else {
                utf16 = (unsigned short *) emalloc((str_len+1) * sizeof(unsigned short));