Fix crash case in data bytecode handling (raw followed by non-raw value).

Reported by: Danny Reeves <danny_reeves@hotmail.com>

svn path=/trunk/yasm/; revision=1646
0.6.0
Peter Johnson 18 years ago
parent 337dcd9b64
commit f072502ad1
  1. 2
      libyasm/bc-data.c
  2. 2
      libyasm/tests/Makefile.inc
  3. 3
      libyasm/tests/data-rawvalue.asm
  4. 13
      libyasm/tests/data-rawvalue.hex

@ -300,6 +300,8 @@ yasm_bc_create_data(yasm_datavalhead *datahead, unsigned int size,
&dvo->data.raw.contents[len],
1);
} else {
if (len > 0)
dvo = STAILQ_NEXT(dvo, link);
dvo->type = dv->type;
dvo->data.val = dv->data.val; /* structure copy */
dvo->data.val.size = size*8; /* remember size */

@ -12,6 +12,8 @@ EXTRA_DIST += libyasm/tests/absloop-err.asm
EXTRA_DIST += libyasm/tests/absloop-err.errwarn
EXTRA_DIST += libyasm/tests/charconst64.asm
EXTRA_DIST += libyasm/tests/charconst64.hex
EXTRA_DIST += libyasm/tests/data-rawvalue.asm
EXTRA_DIST += libyasm/tests/data-rawvalue.hex
EXTRA_DIST += libyasm/tests/duplabel-err.asm
EXTRA_DIST += libyasm/tests/duplabel-err.errwarn
EXTRA_DIST += libyasm/tests/emptydata.asm

@ -0,0 +1,3 @@
x db 0
dd 0,x,0

@ -0,0 +1,13 @@
00
00
00
00
00
00
00
00
00
00
00
00
00
Loading…
Cancel
Save