From 46f922bdf795f07effc0c435fe54c9de74c22939 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sun, 18 Dec 2005 12:50:28 +0000 Subject: [PATCH] MFH: 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..0a33de4133 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, 0); } - REPLACE_ZVAL_VALUE(&out_message, tmp, 0); FREE_ZVAL(tmp); PHP_VAR_UNSERIALIZE_DESTROY(var_hash); } else { -- 2.50.1