summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-27 16:39:26 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-01-27 16:40:07 -0800
commitd387b8c6ddb40a03eca3fad443a3f09cac2c6f58 (patch)
tree549d5bba8eb26eac89da21d5f47dd846f6002e70
parentf3d2d41e06807fcff2af2504536240eef4c483e2 (diff)
downloadnasm-d387b8c6ddb40a03eca3fad443a3f09cac2c6f58.tar.gz
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.
-rw-r--r--assemble.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/assemble.c b/assemble.c
index f15b11a8..681af699 100644
--- a/assemble.c
+++ b/assemble.c
@@ -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;