com php-src: Fixed segfault while info printing: ext/mysqlnd/ph p_mysqlnd.c
| From: | Xinchen Hui | Date: | Mon, 30 Jun 2014 07:26:55 +0000 |
| Subject: | com php-src: Fixed segfault while info printing: ext/mysqlnd/ph p_mysqlnd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79164@lists.php.net to get a copy of this message | ||
Commit: d660d7f5997347942452ab639345fee7711254a2
Author: Xinchen Hui <laruence@php.net> Mon, 30 Jun 2014 15:26:55 +0800
Parents: 9c96d966bbe7e5d3743498539822247fa5763c44
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d660d7f5997347942452ab639345fee7711254a2
Log:
Fixed segfault while info printing
Changed paths:
M ext/mysqlnd/php_mysqlnd.c
Diff:
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index 3bcaa06..e0bc6d1 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -154,12 +154,12 @@ PHP_MINFO_FUNCTION(mysqlnd)
smart_str tmp_str = {0};
mysqlnd_plugin_apply_with_argument(mysqlnd_minfo_dump_loaded_plugins, &tmp_str);
smart_str_0(&tmp_str);
- php_info_print_table_row(2, "Loaded plugins", tmp_str.s->val);
+ php_info_print_table_row(2, "Loaded plugins", tmp_str.s? tmp_str.s->val :
"");
smart_str_free(&tmp_str);
mysqlnd_minfo_dump_api_plugins(&tmp_str TSRMLS_CC);
smart_str_0(&tmp_str);
- php_info_print_table_row(2, "API Extensions", tmp_str.s->val);
+ php_info_print_table_row(2, "API Extensions", tmp_str.s? tmp_str.s->val :
"");
smart_str_free(&tmp_str);
}