From: Andy Heninger Date: Thu, 14 Jun 2018 23:12:42 +0000 (+0000) Subject: ICU-13593 Fix heap-buffer-overflow in TestIDNAMonkeyTest X-Git-Tag: last-svn-commit~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2b346c183e499bc8b7cc5c22801b6095a43e413;p=icu ICU-13593 Fix heap-buffer-overflow in TestIDNAMonkeyTest X-SVN-Rev: 41526 --- diff --git a/icu4c/source/common/usprep.cpp b/icu4c/source/common/usprep.cpp index cc8069dce8b..067ecfe7cfc 100644 --- a/icu4c/source/common/usprep.cpp +++ b/icu4c/source/common/usprep.cpp @@ -726,7 +726,7 @@ usprep_prepare( const UStringPrepProfile* profile, ((result < _SPREP_TYPE_THRESHOLD) && (result & 0x01) /* first bit says it the code point is prohibited*/) ){ *status = U_STRINGPREP_PROHIBITED_ERROR; - uprv_syntaxError(b1, b2Index-U16_LENGTH(ch), b2Len, parseError); + uprv_syntaxError(b2, b2Index-U16_LENGTH(ch), b2Len, parseError); return 0; }