Skip to content
Browse files

fixed segv when extensions or render flags ommited

  • Loading branch information...
1 parent ddc2ba7 commit 27706d052609f622e484013e0ac07918177d8b5c @chobie committed Jan 9, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/php_sundown.c
  2. +2 −2 src/sundown_markdown.c
View
4 src/php_sundown.c
@@ -299,8 +299,8 @@ PHP_METHOD(sundown, __construct)
add_property_string_ex(getThis(),"data",sizeof("data"),buffer,1 TSRMLS_CC);
if (extensions == NULL) {
- MAKE_STD_ZVAL(extensions);
- array_init(extensions);
+ MAKE_STD_ZVAL(c_extensions);
+ array_init(c_extensions);
} else {
ALLOC_INIT_ZVAL(c_extensions);
ZVAL_ZVAL(c_extensions,extensions,1,0);
View
4 src/sundown_markdown.c
@@ -348,8 +348,8 @@ PHP_METHOD(sundown_markdown, __construct)
object->render = render;
if (extensions == NULL) {
- MAKE_STD_ZVAL(extensions);
- array_init(extensions);
+ MAKE_STD_ZVAL(c_extensions);
+ array_init(c_extensions);
} else {
ALLOC_INIT_ZVAL(c_extensions);
ZVAL_ZVAL(c_extensions,extensions,1,0);

0 comments on commit 27706d0

Please sign in to comment.
Something went wrong with that request. Please try again.