diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-29 13:20:45 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-29 11:37:32 +0000 |
commit | e931b123e90ca0162e112148de5cd35f149e4841 (patch) | |
tree | 607417f032832050ca318d85dbd6aea2ef53b6ba /src/qml/compiler/qv4instr_moth_p.h | |
parent | 77e0602021c74b5ec2d8bd9affff5e91bf6f5ae3 (diff) |
Fix stack-buffer-overflow reported by ASAN
sizeof(Ret) is 1, but the Size was rounded up to 4.
Change-Id: I5022e369937458ccaa3efed066f62d2c2d36c3a0
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index cc26c88155..a90954eaea 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -300,7 +300,7 @@ QT_BEGIN_NAMESPACE #define MOTH_INSTR_ALIGN_MASK (Q_ALIGNOF(QV4::Moth::Instr) - 1) #define MOTH_INSTR_ENUM(I) I, -#define MOTH_INSTR_SIZE(I) ((sizeof(QV4::Moth::Instr::instr_##I) + MOTH_INSTR_ALIGN_MASK) & ~MOTH_INSTR_ALIGN_MASK) +#define MOTH_INSTR_SIZE(I) (sizeof(QV4::Moth::Instr::instr_##I)) #define MOTH_DEFINE_ARGS(nargs, ...) \ MOTH_DEFINE_ARGS##nargs(__VA_ARGS__) |