]> granicus.if.org Git - php/commitdiff
If ordered is not set a random compiler assigned value of *p2 would be used,
authorIlia Alshanetsky <iliaa@php.net>
Mon, 4 Nov 2002 17:26:44 +0000 (17:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 4 Nov 2002 17:26:44 +0000 (17:26 +0000)
this patch fixes the problem by initializing *p2 to NULL.

Zend/zend_hash.c

index 61b3b036f69fa970fa302fe9cc9c074139d8e993..aa34fb09cf9fe5da40d881278aaeffa53fc8cee8 100644 (file)
@@ -1163,7 +1163,7 @@ ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
 
 ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
 {
-       Bucket *p1, *p2;
+       Bucket *p1, *p2=NULL;
        int result;
        void *pData2;