]> granicus.if.org Git - icu/commit
ICU-21174 Increase safety of Measure and writeAffixes.
authorHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 4 Aug 2020 02:49:23 +0000 (04:49 +0200)
committerHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 4 Aug 2020 23:52:40 +0000 (01:52 +0200)
commit5d97c9f13e3c8612cbedd001e81539a16569a51a
treea7dc54fa55ddfb09127187d44c00c5d0a0a39e21
parentee2d8b01034c3101de2bd58f9328daa076995e9e
ICU-21174 Increase safety of Measure and writeAffixes.

Measure: initialize unit to nullptr, and don't dereference it if it is
nullptr.

NumberFormatterImpl::writeAffixes: U_ASSERT not-null, instead of
segfaulting for coding mistakes.
icu4c/source/i18n/measure.cpp
icu4c/source/i18n/number_formatimpl.cpp