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:
H. Peter Anvin 2008-01-27 16:39:26 -08:00
parent f3d2d41e06
commit d387b8c6dd

View File

@ -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;