# # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # Prevent buffer overflow in TimeZoneFormat::parse https://unicode-org.atlassian.net/browse/ICU-12375 --- icu/source/i18n/tzfmt.cpp.orig +++ icu/source/i18n/tzfmt.cpp @@ -1086,6 +1086,11 @@ } break; } + default: + { + pos.setErrorIndex(startIdx); + return nullptr; + } } evaluated |= STYLE_PARSE_FLAGS[style];