Skip to content

Instantly share code, notes, and snippets.

@hughdavenport
Created January 1, 2019 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hughdavenport/7f7b78c08aea058eaa955510d1548f12 to your computer and use it in GitHub Desktop.
Save hughdavenport/7f7b78c08aea058eaa955510d1548f12 to your computer and use it in GitHub Desktop.
diff --git a/ext/mbstring/oniguruma/enc/unicode.c b/ext/mbstring/oniguruma/enc/unicode.c
index e13429f51e..a4bf15ea22 100644
--- a/ext/mbstring/oniguruma/enc/unicode.c
+++ b/ext/mbstring/oniguruma/enc/unicode.c
@@ -10989,6 +10989,7 @@ onigenc_unicode_mbc_case_fold(OnigEncoding enc,
code = ONIGENC_MBC_TO_CODE(enc, p, end);
len = enclen(enc, p);
+ if (*pp + len > end) len = end - *pp;
*pp += len;
#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment