summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2013-02-23 16:43:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-25 12:38:31 +0100
commit7df995a9bd3e989b4136f98424490604eb5178aa (patch)
tree7acf83befe143faf3c867d664e40e01d830b10c8 /src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
parenta8fce5d6e2cfc4971ca932a18e38662de3482cbc (diff)
Harfbuzz: backporting fixes from upstream
81c8ef785b079980ad5b46be4fe7c7bf156dbf65 Fix crash! 81f2ecafa19b602f950df5a9e6e1b99c4b5ea55e Bug 30319 ff0612c2e7df1b86fc702c72e3015a6a5ae39b4c and 2dbd0fd11799c18bb6c66e337c3e31a1419823d4 Fix OOB access possibility 3bebe289aace6daa84b3d6983cebf5c58ddfad78 Fix problem with Indic shaper and control chars 90138e5a4d15c44f05456f90083ecacdc3196c8e Fix bad memory access in Myanmar shaper b847f24ce855d24f6822bcd9c0006905e81b94d8 Fix Arabic cursive positioning 3ab7b37bdebf0f8773493a1fee910b151c4de30f Fix misc leaks Change-Id: I6f3a6253782bff6abe4bf741d11c09fdd67542db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/harfbuzz/src/harfbuzz-arabic.c')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-arabic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
index 0293a5dadf..660939415b 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
@@ -1114,16 +1114,22 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) {
HB_Bool ot_ok;
- if (arabicSyriacOpenTypeShape(item, &ot_ok))
+ if (arabicSyriacOpenTypeShape(item, &ot_ok)) {
+ HB_FREE_STACKARRAY(shapedChars);
return TRUE;
- if (ot_ok)
+ }
+ if (ot_ok) {
+ HB_FREE_STACKARRAY(shapedChars);
return FALSE;
/* fall through to the non OT code*/
+ }
}
#endif
- if (item->item.script != HB_Script_Arabic)
+ if (item->item.script != HB_Script_Arabic) {
+ HB_FREE_STACKARRAY(shapedChars);
return HB_BasicShape(item);
+ }
shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen,
item->item.bidiLevel % 2,