Skip to content

Commit 087cb7b

Browse files
committed
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe() set version for release
2 parents ff7029b + 1258303 commit 087cb7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mbstring/oniguruma/src/regext.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include "regint.h"
3131

32+
#if 0
3233
static void
3334
conv_ext0be32(const UChar* s, const UChar* end, UChar* conv)
3435
{
@@ -158,6 +159,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
158159

159160
return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION;
160161
}
162+
#endif
161163

162164
extern int
163165
onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
@@ -169,9 +171,7 @@ onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
169171
if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
170172

171173
if (ci->pattern_enc != ci->target_enc) {
172-
r = conv_encoding(ci->pattern_enc, ci->target_enc, pattern, pattern_end,
173-
&cpat, &cpat_end);
174-
if (r) return r;
174+
return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION;
175175
}
176176
else {
177177
cpat = (UChar* )pattern;

0 commit comments

Comments
 (0)