diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-05-02 11:49:36 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-05-03 15:18:46 (GMT) |
commit | 4cb9db404224c55859713c282aa90409e375c372 (patch) | |
tree | 5bf4095b2f67443bd4cb2dde20686572e6c6501a /src | |
parent | 320f172c851a4720299297c8b3b757eb1202c568 (diff) | |
download | Qt-4cb9db404224c55859713c282aa90409e375c372.zip Qt-4cb9db404224c55859713c282aa90409e375c372.tar.gz Qt-4cb9db404224c55859713c282aa90409e375c372.tar.bz2 |
Don't rely on uninitialized data
HB_GetCharAttributes used to require a zero-initialized array for
attributes, as it selectively sets relevant bits for each character. We
ease that requirement by always initializing the attributes buffer
explicitly with memset.
Task-number: QT-4911
Reviewed-by: Ritt Konstantin
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index ce4d4ac..1021b02 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -643,6 +643,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) { |