]> granicus.if.org Git - php/commitdiff
MFH: fix possible usage of uninitialized variable
authorAntony Dovgal <tony2001@php.net>
Fri, 19 May 2006 10:28:54 +0000 (10:28 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 19 May 2006 10:28:54 +0000 (10:28 +0000)
ext/sysvmsg/sysvmsg.c

index 7078fc612a7f4603361b9a6694a44e927b6d7658..a7ce77f8b9dd027c2145b65e9f1fb3f861cf488c 100644 (file)
@@ -318,8 +318,9 @@ PHP_FUNCTION(msg_receive)
                        if (!php_var_unserialize(&tmp, &p, p + result, &var_hash TSRMLS_CC)) {
                                zend_error(E_WARNING, "%s(): message corrupted", get_active_function_name(TSRMLS_C));
                                RETVAL_FALSE;
+                       } else {
+                               REPLACE_ZVAL_VALUE(&out_message, tmp, 0);
                        }
-                       REPLACE_ZVAL_VALUE(&out_message, tmp, 0);
                        FREE_ZVAL(tmp);
                        PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
                } else {