diff options
Diffstat (limited to 'src/declarative/qml/qmetaobjectbuilder.cpp')
-rw-r--r-- | src/declarative/qml/qmetaobjectbuilder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index a63656b..d8a7b77 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -1452,6 +1452,7 @@ QMetaObject *QMetaObjectBuilder::toMetaObject() const { int size = buildMetaObject(d, 0, false); char *buf = reinterpret_cast<char *>(qMalloc(size)); + memset(buf, 0, size); buildMetaObject(d, buf, false); return reinterpret_cast<QMetaObject *>(buf); } @@ -1481,6 +1482,7 @@ QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const QByteArray data; data.resize(size); char *buf = data.data(); + memset(buf, 0, size); buildMetaObject(d, buf, true); if (ok) *ok = true; return data; |