From 176c27c1493821980fe4f5d499dabd1f63e23a2c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sun, 18 Dec 2005 12:48:22 +0000 Subject: [PATCH] fix possible usage of uninitialized variable --- ext/sysvmsg/sysvmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.40.0