summaryrefslogtreecommitdiffstats
path: root/bug73007.patch
blob: e707c225fac0d3574a033f2318623f410d9a60dc (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
Backported from 5.6.26 by Remi.


From 20fa323d53257a776bd7551ce7bdb2261cfe5420 Mon Sep 17 00:00:00 2001
From: Stanislav Malyshev <stas@php.net>
Date: Mon, 5 Sep 2016 18:01:35 -0700
Subject: [PATCH] Fix bug #73007: add locale length check

---
 ext/intl/msgformat/msgformat_format.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c
index 25c9619..9b6df38 100644
--- a/ext/intl/msgformat/msgformat_format.c
+++ b/ext/intl/msgformat/msgformat_format.c
@@ -118,6 +118,8 @@ PHP_FUNCTION( msgfmt_format_message )
 		RETURN_FALSE;
 	}
 
+	INTL_CHECK_LOCALE_LEN(slocale_len);
+
 	msgformat_data_init(&mfo->mf_data TSRMLS_CC);
 
 	if(pattern && pattern_len) {