Permalink
Browse files

fix segfault in sundown_render_base

  • Loading branch information...
remicollet committed Dec 15, 2013
1 parent 31ce163 commit 9f2d92ada380fce3abf3d68d890c3a9cac6194eb
Showing with 3 additions and 2 deletions.
  1. +1 −1 php_sundown.h
  2. +2 −1 render_base.c
View
@@ -163,7 +163,7 @@ static int call_user_function_v(HashTable *function_table, zval **object_pp, zva
TSRMLS_FETCH();
if (param_count > 0) {
- params = emalloc(sizeof(zval**) * param_count);
+ params = emalloc(sizeof(zval*) * param_count);
va_start(ap, param_count);
for (i=0; i<param_count;i++) {
params[i] = va_arg(ap, zval*);
View
@@ -227,7 +227,8 @@ PHP_METHOD(sundown_render_base, blockHtml)
PHP_METHOD(sundown_render_base, header)
{
char *htext;
- int htext_len, header_level;
+ int htext_len;
+ long header_level;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"sl", &htext, &htext_len, &header_level) == FAILURE) {

0 comments on commit 9f2d92a

Please sign in to comment.