Skip to content

Instantly share code, notes, and snippets.

@libnex
Created November 7, 2016 10:48
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 libnex/4f3382725b4020763af64c9a5e6acf5e to your computer and use it in GitHub Desktop.
Save libnex/4f3382725b4020763af64c9a5e6acf5e to your computer and use it in GitHub Desktop.
Patch for PHP Bug #73473: Stack Buffer Overflow in msgfmt_parse_message
wdiff --git a/php-7.0.12/ext/intl/msgformat/msgformat_parse.c b/php-7.0.12/ext/intl/msgformat/msgformat_parse.c.patched
index 3496339..8f5acbe 100644
--- a/php-7.0.12/ext/intl/msgformat/msgformat_parse.c
+++ b/php-7.0.12/ext/intl/msgformat/msgformat_parse.c.patched
@@ -109,7 +109,7 @@ PHP_FUNCTION( msgfmt_parse_message )
RETURN_FALSE;
}
-
+ INTL_CHECK_LOCALE_LEN(slocale_len);
memset(mfo, 0, sizeof(*mfo));
msgformat_data_init(&mfo->mf_data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment