-
-
Save hughdavenport/3db8c2b9f92765c84196b387c32faaea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/mbstring/oniguruma/src/utf32_be.c b/ext/mbstring/oniguruma/src/utf32_be.c | |
index 92476ec033..dc1eb058a5 100644 | |
--- a/ext/mbstring/oniguruma/src/utf32_be.c | |
+++ b/ext/mbstring/oniguruma/src/utf32_be.c | |
@@ -65,8 +65,9 @@ utf32be_is_mbc_newline(const UChar* p, const UChar* end) | |
} | |
static OnigCodePoint | |
-utf32be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) | |
+utf32be_mbc_to_code(const UChar* p, const UChar* end) | |
{ | |
+ if (p + 4 > end) return (OnigCodePoint ) NULL; | |
return (OnigCodePoint )(((p[0] * 256 + p[1]) * 256 + p[2]) * 256 + p[3]); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment