Fix potential memory corruption.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Mon, 5 Sep 2011 13:36:19 +0000 (15:36 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Sep 2011 08:22:43 +0000 (10:22 +0200)
commited438f667cb33d77d66a1a8dc4edd691f435a61c
treef6d209056df63eee5272f6b5d58973ea6b0e7418
parent6cd22a4ca88df08e38f43f0c6d106f0483c4720a
Fix potential memory corruption.

The code exploited information that most of types in union use d
pointers and that size of d pointer is less or equals then
sizeof(QVariant) or sizeof(double). Still the code may suffer
from an alignment issue on some exotic platforms.

Change-Id: I4ef331f4cdb7177337ddcc8696f78d85e9594d27
Reviewed-on: http://codereview.qt-project.org/4244
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/declarative/qml/v8/qv8qobjectwrapper.cpp