aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-05-04 15:46:58 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-05-29 08:11:57 +0000
commit8e5662dd7c7e346702734b856dc4692fa51c315d (patch)
tree3efcef52b8230f0101bbed2f5bfe5a33a99566d9 /src/qml/compiler/qv4instr_moth_p.h
parent04ad4f2d9c8d5c93c33f873a3b8a5a86b7489634 (diff)
Fix possibly unaligned reads in interpreter
Change-Id: Icaa6fa5dc0fa9a03127b0c28dfd84b9b3057212e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 5dc20ba11b..a783f9352c 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -375,7 +375,9 @@ QT_BEGIN_NAMESPACE
nargs,
#define MOTH_DECODE_ARG(arg, type, nargs, offset) \
- arg = qFromLittleEndian<type>(reinterpret_cast<const type *>(code)[-nargs + offset]);
+ arg = qFromLittleEndian<type>( \
+ static_cast<const void *>( \
+ &reinterpret_cast<const type *>(code)[-nargs + offset]));
#define MOTH_ADJUST_CODE(type, nargs) \
code += static_cast<quintptr>(nargs*sizeof(type) + 1)