We're updating the issue view to help you get more done. 

Normalizer::compose crash

Description

This is probably true for other Normalizer APIs. If you pass the same
UnicodeString as both the source and the destination, the call to
Normalizer::compose crashes since unorm_compose gets passed NULL for source
buffer, due to getBuffer semantics.

Offending call:
Normalizer::compose(s, FALSE, 0, s, *status);

Code that messes up things:
UChar *buffer=result.getBuffer(source.length());
int32_t length=unorm_compose(buffer, result.getCapacity(),
source.getBuffer(), source.length(),
compat, (options&IGNORE_HANGUL)!=0,
&status);

One should check whether source and destination are same objects before going
further.

Status

Assignee

Markus Scherer

Reporter

TracBot

Labels

Reviewer

None

Time Needed

None

Start date

None

Components

Fix versions

Priority

blocker