OOM not handled in selectForMask

Description

In the helper/internal function selectForMask, called by ucnvsel_selectForString and ucnvsel_selectForUTF8 there is an unchecked malloc, which can lead a segmentation fault/crash if OOM occurs.

https://github.com/unicode-org/icu/blob/master/icu4c/source/common/ucnvsel.cpp#L722

 

The output from using a modified version of cintltst (which randomly fails to allocate) running under valgrind:

 

Assignee

Jeff Genovy

Reporter

Jeff Genovy

Components

Labels

Reviewer

None

Priority

medium

Time Needed

Hours

Fix versions

Configure