diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-28 16:53:37 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-29 17:40:03 +0000 |
commit | a6fb18f1865aff8b96dfba1e341019371b5fa9f2 (patch) | |
tree | 330940164adcbb048a715415f5c462b7abbffccd /src/qml/compiler/qv4compileddata_p.h | |
parent | e38f5e9cb1430c2bd1095f566ed752d36eed0029 (diff) |
Fix uninitialized variables/data
* Initialize the indexOfRootObject member
* When creating the QV4::CompiledData::String objects,
don't include the one ushort _beyond_ the QString, which
is random data.
Change-Id: I8fe8a465e2713a385504f217b367a62b70ee5fdf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index f46e27fe98..48324fbbc4 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -135,7 +135,7 @@ struct String // uint16 strdata[] static int calculateSize(const QString &str) { - return (sizeof(String) + (str.length() + 1) * sizeof(quint16) + 7) & ~0x7; + return (sizeof(String) + str.length() * sizeof(quint16) + 7) & ~0x7; } }; |