summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-25 08:37:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-25 08:37:11 (GMT)
commit1f2a0f161e3920923f97890be940762d6db314e3 (patch)
tree211797cc2bf0c0626743eea0f70cc21a6d00935d
parent1323737d3901936853075de8206a88154b858d85 (diff)
parentc049aff3ce283b9ba9a17a63aedaa70efb51ad09 (diff)
downloadQt-1f2a0f161e3920923f97890be940762d6db314e3.zip
Qt-1f2a0f161e3920923f97890be940762d6db314e3.tar.gz
Qt-1f2a0f161e3920923f97890be940762d6db314e3.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 4b88f595ab62b7c5f703a286c4f5f13f8784a936
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index fc2bdbf..e153ba9 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -53,6 +53,8 @@ static void to_tis620(const HB_UChar16 *string, hb_uint32 len, const char *cstr)
else
result[i] = '?';
}
+
+ result[len] = 0;
}
static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttributes *attributes)
@@ -70,8 +72,8 @@ static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttri
if (!th_brk)
return;
- if (len > 128)
- cstr = (char *)malloc(len*sizeof(char));
+ if (len >= 128)
+ cstr = (char *)malloc(len*sizeof(char) + 1);
to_tis620(string, len, cstr);
@@ -96,7 +98,7 @@ static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttri
if (break_positions != brp)
free(break_positions);
- if (len > 128)
+ if (len >= 128)
free(cstr);
}