diff options
author | Scott MacVicar <scottmac@php.net> | 2009-01-29 22:58:52 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2009-01-29 22:58:52 +0000 |
commit | d84d3e47f33d3c4193bc3d3e17d4ddc6dfafe836 (patch) | |
tree | b839e2ada5a085cb52d2a51c395db06bbbb7d22b | |
parent | ca779b84f9cd6987ecb40eca7f006087754010f6 (diff) | |
download | php-git-d84d3e47f33d3c4193bc3d3e17d4ddc6dfafe836.tar.gz |
Fix bug #47245 - Double free in mb_detect_encoding()
-rw-r--r-- | ext/mbstring/mbstring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 8c0ac175b8..ed186255d0 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2666,6 +2666,7 @@ PHP_FUNCTION(mb_detect_encoding) if (!php_mb_parse_encoding_array(*arg_list, &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); + list = NULL; size = 0; } } @@ -2675,6 +2676,7 @@ PHP_FUNCTION(mb_detect_encoding) if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg_list), Z_STRLEN_PP(arg_list), &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); + list = NULL; size = 0; } } |