mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
BR 1880905: make sure we have enough zero-padding data for 'DO'
When using DO with a string that was too short, we would run off the end of an all-zero buffer. Make sure the buffer is long enough.
This commit is contained in:
parent
f3d2d41e06
commit
d387b8c6dd
@ -312,7 +312,8 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, uint32_t cp,
|
||||
|
||||
if (align) {
|
||||
align = wsize - align;
|
||||
out(offset, segment, "\0\0\0\0\0\0\0\0",
|
||||
out(offset, segment,
|
||||
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
|
||||
OUT_RAWDATA, align, NO_SEG, NO_SEG);
|
||||
}
|
||||
offset += e->stringlen + align;
|
||||
|
Loading…
Reference in New Issue
Block a user