]> granicus.if.org Git - icu/commit
ICU-20363 Out of boundary write on empty file.
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 19 Jan 2019 15:54:18 +0000 (16:54 +0100)
committerSteven R. Loomis <srl295@gmail.com>
Wed, 13 Feb 2019 18:22:56 +0000 (10:22 -0800)
commitc04f9f1c01d1f36d8c47fdc0e233d253014d236d
tree5667d4f8f8264d5d62d2be5e6dedb85c9a68aec0
parentd2d8f0ec8f4a2d230a0d8b63e1aeeafc13e7e2b0
ICU-20363 Out of boundary write on empty file.

If gencnval encounters an empty input file the function resolveAlias
triggers an out of boundary write due to uniqueAliasArr pointing to
a 0 byte reserved memory address.

This patch protects the code in question with a check for
knownAliasesCount being not 0.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
icu4c/source/tools/gencnval/gencnval.c