[text] Crash when multi-byte utf8 text exceeds max_length
authorRaymond Liu <raymond.liu@intel.com>
Wed, 11 Mar 2009 06:35:26 +0000 (14:35 +0800)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 11 Mar 2009 17:50:51 +0000 (17:50 +0000)
commit039e282a40c4f1a0f0d58fd0d46d713ffb8ea36b
tree27d621b8bd72903e0f63e29bed21af10198480b9
parenta83a5d55935a7dfd54de52368b4a1cd6768a257a
[text] Crash when multi-byte utf8 text exceeds max_length

Bug 1500 - [Patch] clutter_text crash with non one-byte utf8 text exceed
           max_length

In clutter_text_set_text_internal(), when text length in character is greater
than max_length, and there are multi-byte character in it, then the new text
string buffer is not malloc()'ed with right length. This will cause the app to
crash with segmention fault.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-text.c