summaryrefslogtreecommitdiffstats
path: root/sundown-pr37.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-12-15 09:55:32 +0100
committerRemi Collet <fedora@famillecollet.com>2013-12-15 09:55:32 +0100
commit55e1d093233083cb40b9e2c0a46dc2699aa911bc (patch)
treea4c2cbbfaf87004cb86ca72d12101e6c2dda027a /sundown-pr37.patch
php-pecl-sundown: 0.3.10 (beta) - New package
Diffstat (limited to 'sundown-pr37.patch')
-rw-r--r--sundown-pr37.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/sundown-pr37.patch b/sundown-pr37.patch
new file mode 100644
index 0000000..ec2f8f6
--- /dev/null
+++ b/sundown-pr37.patch
@@ -0,0 +1,40 @@
+From 9f2d92ada380fce3abf3d68d890c3a9cac6194eb Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 15 Dec 2013 09:28:29 +0100
+Subject: [PATCH] fix segfault in sundown_render_base
+
+---
+ php_sundown.h | 2 +-
+ render_base.c | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/php_sundown.h b/php_sundown.h
+index 45db836..1593f1d 100644
+--- a/php_sundown.h
++++ b/php_sundown.h
+@@ -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*);
+diff --git a/render_base.c b/render_base.c
+index d9aee24..3cec492 100644
+--- a/render_base.c
++++ b/render_base.c
+@@ -227,7 +227,8 @@ zend_object_value php_sundown_render_base_new(zend_class_entry *ce TSRMLS_DC)
+ 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) {
+--
+1.8.5.1
+