diff options
| author | Scott MacVicar <scottmac@php.net> | 2009-01-29 22:59:57 +0000 |
|---|---|---|
| committer | Scott MacVicar <scottmac@php.net> | 2009-01-29 22:59:57 +0000 |
| commit | 09370413757acd3ac21c775134ad1249a7d43d5e (patch) | |
| tree | 35422f92266a0282785a83e1b8d10e152697ed6a /ext/mbstring/mbstring.c | |
| parent | a3c422974b83b77e3e35161653ba3b5f5123f095 (diff) | |
| download | php-git-09370413757acd3ac21c775134ad1249a7d43d5e.tar.gz | |
MFB Fix bug #47245 - Double free in mb_detect_encoding()
Diffstat (limited to 'ext/mbstring/mbstring.c')
| -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 e26bbbebc4..471dbdb3ab 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3187,6 +3187,7 @@ PHP_FUNCTION(mb_detect_encoding) if (!php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); + list = NULL; size = 0; } } @@ -3196,6 +3197,7 @@ PHP_FUNCTION(mb_detect_encoding) if (!php_mb_parse_encoding_list(Z_STRVAL_P(encoding_list), Z_STRLEN_P(encoding_list), &list, &size, 0 TSRMLS_CC)) { if (list) { efree(list); + list = NULL; size = 0; } } |
