summaryrefslogtreecommitdiff
path: root/asm/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2017-03-31 14:52:03 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-03-31 14:53:24 -0700
commit1980abfb7a1f26bf73a796bafa514190bc370a59 (patch)
tree57e61b6b8faf7f8db7696937fae193d4eac8d0da /asm/parser.c
parentc33d95fde9f8ae6252c8ecf4d66c543dfa914d83 (diff)
downloadnasm-1980abfb7a1f26bf73a796bafa514190bc370a59.tar.gz
BR 3392363: clear the operands when making an artificial I_RESB
When we make an artificial RESB instructions (due to isolated prefixes) we need to make sure there isn't any crap left in the operands structure. The easiest way to guarantee that is to force it to zero. Reported-by: Henrik <henrik@gramner.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'asm/parser.c')
-rw-r--r--asm/parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/asm/parser.c b/asm/parser.c
index 9f247b5c..9093cf20 100644
--- a/asm/parser.c
+++ b/asm/parser.c
@@ -550,6 +550,7 @@ restart_parse:
*/
result->opcode = I_RESB;
result->operands = 1;
+ nasm_zero(result->oprs);
result->oprs[0].type = IMMEDIATE;
result->oprs[0].offset = 0L;
result->oprs[0].segment = result->oprs[0].wrt = NO_SEG;