From: Antony Dovgal Date: Sun, 18 Dec 2005 12:48:22 +0000 (+0000) Subject: fix possible usage of uninitialized variable X-Git-Tag: RELEASE_1_0_4~341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=176c27c1493821980fe4f5d499dabd1f63e23a2c;p=php fix possible usage of uninitialized variable --- diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index affa6e20ad..0404ff80c1 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -341,8 +341,9 @@ PHP_FUNCTION(msg_receive) if (!php_var_unserialize(&tmp, &p, p + result, &var_hash TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "message corrupted"); RETVAL_FALSE; + } else { + REPLACE_ZVAL_VALUE(&out_message, tmp, 1); } - REPLACE_ZVAL_VALUE(&out_message, tmp, 0); FREE_ZVAL(tmp); PHP_VAR_UNSERIALIZE_DESTROY(var_hash); } else {