diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-05 17:36:36 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-05 17:36:36 (GMT) |
commit | 95cd3aca76a47d59ef43e7c1566e5d43ab8b7c30 (patch) | |
tree | 0935915e89ed396cd4f33c553857d84ab39d95b7 /src | |
parent | 0ca404def7262ad7293592bbb7888a6df5ea27b7 (diff) | |
parent | c1bbcda2cdd70d2a7a615bf823c55520914b90f5 (diff) | |
download | Qt-95cd3aca76a47d59ef43e7c1566e5d43ab8b7c30.zip Qt-95cd3aca76a47d59ef43e7c1566e5d43ab8b7c30.tar.gz Qt-95cd3aca76a47d59ef43e7c1566e5d43ab8b7c30.tar.bz2 |
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration:
QNAM HTTP: Fix bug with explicitly zero-length compressed responses.
Add enablers for Symbian App Booster
Don't rely on uninitialized data
Don't realloc user-provided buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qtextboundaryfinder.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index c202e1f..3410782 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -655,6 +655,7 @@ void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, const HB_ScriptItem *items, hb_uint32 numItems, HB_CharAttributes *attributes) { + memset(attributes, 0, stringLength * sizeof(HB_CharAttributes)); calcLineBreaks(string, stringLength, attributes); for (hb_uint32 i = 0; i < numItems; ++i) { diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index 34bc406..47319d4 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -199,11 +199,11 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o chars = other.chars; length = other.length; pos = other.pos; - freePrivate = true; QTextBoundaryFinderPrivate *newD = (QTextBoundaryFinderPrivate *) - realloc(d, length*sizeof(HB_CharAttributes)); + realloc(freePrivate ? d : 0, length*sizeof(HB_CharAttributes)); Q_CHECK_PTR(newD); + freePrivate = true; d = newD; memcpy(d, other.d, length*sizeof(HB_CharAttributes)); |