com php-src: Fix Bug #67468 Segfault in highlight_file() /highlight_string() when pgsql.so module is l oaded: Zend/zend_highlight.c
Zend/zend_indent.c
| From: | Ferenc Kovacs | Date: | Mon, 23 Jun 2014 07:51:44 +0000 |
| Subject: | com php-src: Fix Bug #67468 Segfault in highlight_file() /highlight_string() when pgsql.so module is l oaded: Zend/zend_highlight.c Zend/zend_indent.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79010@lists.php.net to get a copy of this message | ||
Commit: c5e6c2a5f58be770603b490d23384b5fc66a38f6
Author: Andreas Ferber <aferber@marcant.net> Thu, 19 Jun 2014 00:15:07 +0200
Committer: Ferenc Kovacs <tyrael@php.net> Mon, 23 Jun 2014 09:51:44 +0200
Parents: f08a5bfadc360cb53574bdb2f4dc32ac30636133
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c5e6c2a5f58be770603b490d23384b5fc66a38f6
Log:
Fix Bug #67468 Segfault in highlight_file()/highlight_string() when pgsql.so module is loaded
str_efree() must be used in zend_highlight() and zend_indent() to free
string data assigned to a zval to account for interned strings.
Bugs:
https://bugs.php.net/67468
Changed paths:
M Zend/zend_highlight.c
M Zend/zend_indent.c
Diff:
diff --git a/Zend/zend_highlight..c b/Zend/zend_highlight.c
index 68f2b7b..31d99b7 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -150,7 +150,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
case T_DOC_COMMENT:
break;
default:
- efree(token.value.str.val);
+ str_efree(token.value.str.val);
break;
}
}
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index cacdf8d..920d412 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -139,7 +139,7 @@ dflt_printout:
case T_WHITESPACE:
break;
default:
- efree(token.value.str.val);
+ str_efree(token.value.str.val);
break;
}
}