projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3694d4b
)
avoid crash when TWIG_GET_ARRAY_ELEMENT returns NULL
author
Arnaud Le Blanc
<arnaud.lb@gmail.com>
Mon, 20 Aug 2012 18:28:22 +0000 (20:28 +0200)
committer
Arnaud Le Blanc
<arnaud.lb@gmail.com>
Mon, 20 Aug 2012 18:28:22 +0000 (20:28 +0200)
fixes #807
ext/twig/twig.c
patch
|
blob
|
history
diff --git
a/ext/twig/twig.c
b/ext/twig/twig.c
index
2125592
..
498392d
100644
(file)
--- a/
ext/twig/twig.c
+++ b/
ext/twig/twig.c
@@
-713,6
+713,9
@@
PHP_FUNCTION(twig_template_get_attributes)
}
ret = TWIG_GET_ARRAY_ELEMENT(object, item, item_len TSRMLS_CC);
+ if (!ret) {
+ ret = &EG(uninitialized_zval);
+ }
RETVAL_ZVAL(ret, 1, 0);
if (free_ret) {
zval_ptr_dtor(&ret);