summaryrefslogtreecommitdiffstats
path: root/yaml-upstream.patch
blob: c2bf4237283239b4f17aa3a9cbbb6e122524117f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From b015af52451b90bc38463ea4915c150de4a1b9d9 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Sat, 17 Oct 2015 09:42:29 +0200
Subject: [PATCH] free later, fix tests/yaml_emit_005.phpt failure

---
 emit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emit.c b/emit.c
index faa4d07..d210acc 100644
--- a/emit.c
+++ b/emit.c
@@ -668,13 +668,13 @@ static int y_write_object(
 				NULL, (yaml_char_t *) YAML_PHP_TAG, (yaml_char_t *) buf.s->val, buf.s->len,
 				0, 0, YAML_DOUBLE_QUOTED_SCALAR_STYLE);
 
-		smart_string_free(&buf);
 		if (!status) {
 			y_event_init_failed(&event);
 			status = FAILURE;
 		} else {
 			status = y_event_emit(state, &event TSRMLS_CC);
 		}
+		smart_string_free(&buf);
 	}
 
 	return status;
-- 
2.1.4

From 2538b42347d1fc390ebd88ef1c1ca4164c2faecf Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Sat, 17 Oct 2015 09:46:19 +0200
Subject: [PATCH] missing init value, fix segfault in tests/bug_64694.phpt

---
 parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse.c b/parse.c
index d52753a..dbd8cd5 100644
--- a/parse.c
+++ b/parse.c
@@ -880,7 +880,7 @@ static char *convert_to_char(zval *zv TSRMLS_DC)
 	default:
 		{
 			php_serialize_data_t var_hash;
-			smart_str buf;
+			smart_str buf = {0};
 
 			PHP_VAR_SERIALIZE_INIT(var_hash);
 			php_var_serialize(&buf, zv, &var_hash TSRMLS_CC);
-- 
2.1.4