Skip to content

Commit

Permalink
Merge pull request #37 from remicollet/issue-0310
Browse files Browse the repository at this point in the history
fix segfault in sundown_render_base
  • Loading branch information
chobie committed Dec 15, 2013
2 parents 31ce163 + 9f2d92a commit 4d4fdd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php_sundown.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*);
Expand Down
3 changes: 2 additions & 1 deletion render_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4d4fdd3

Please sign in to comment.