cvs: php-src(PHP_5_1) /ext/sysvmsg sysvmsg.c
| From: | Antony Dovgal | Date: | Sun, 18 Dec 2005 12:50:28 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/sysvmsg sysvmsg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36010@lists.php.net to get a copy of this message | ||
tony2001 Sun Dec 18 12:50:28 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src/ext/sysvmsg sysvmsg.c
Log:
MFH: fix possible usage of uninitialized variable
http://cvs.php.net/viewcvs.cgi/php-src/ext/sysvmsg/sysvmsg.c?r1=1.20.2.1&r2=1.20.2.2&diff_format=u
Index: php-src/ext/sysvmsg/sysvmsg.c
diff -u php-src/ext/sysvmsg/sysvmsg.c:1.20.2.1 php-src/ext/sysvmsg/sysvmsg.c:1.20.2.2
--- php-src/ext/sysvmsg/sysvmsg.c:1.20.2.1 Tue Dec 6 02:25:33 2005
+++ php-src/ext/sysvmsg/sysvmsg.c Sun Dec 18 12:50:28 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvmsg.c,v 1.20.2.1 2005/12/06 02:25:33 sniper Exp $ */
+/* $Id: sysvmsg.c,v 1.20.2.2 2005/12/18 12:50:28 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -142,7 +142,7 @@
{
php_info_print_table_start();
php_info_print_table_row(2, "sysvmsg support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.20.2.1 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.20.2.2 $");
php_info_print_table_end();
}
/* }}} */
@@ -341,8 +341,9 @@
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 {