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.

Environment

Status

Assignee

Markus Scherer

Reporter

TracBot

Labels

tracCreated

Aug 28, 2002, 8:30 PM

tracOwner

markus

tracProject

ICU4C,ICU4J and ICU4JNI

tracReporter

weiv@a95c9666650cfc8d

tracResolution

fixed

tracReviewer

weiv

tracStatus

closed

Components

Fix versions

Priority

blocker