A fuzzer attacked i386-dos32.watcom.le
This commit is contained in:
committed by
Markus F.X.J. Oberhumer
parent
8d41ae09c8
commit
707fb55625
@@ -146,6 +146,8 @@ unsigned LeFile::getImageSize() const {
|
|||||||
|
|
||||||
void LeFile::readImage() {
|
void LeFile::readImage() {
|
||||||
soimage = pages * mps;
|
soimage = pages * mps;
|
||||||
|
if (!soimage) // late detection, but protect against .alloc(0)
|
||||||
|
throwCantPack("no soimage");
|
||||||
mb_iimage.alloc(soimage);
|
mb_iimage.alloc(soimage);
|
||||||
mb_iimage.clear();
|
mb_iimage.clear();
|
||||||
iimage = mb_iimage; // => now a SPAN_S
|
iimage = mb_iimage; // => now a SPAN_S
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ void PackWcle::readObjectTable() {
|
|||||||
LeFile::readObjectTable();
|
LeFile::readObjectTable();
|
||||||
|
|
||||||
// temporary copy of the object descriptors
|
// temporary copy of the object descriptors
|
||||||
|
if (!objects) // late detection, but protect against .alloc(0)
|
||||||
|
throwCantPack("no objects");
|
||||||
iobject_desc.alloc(objects * sizeof(*iobject_table));
|
iobject_desc.alloc(objects * sizeof(*iobject_table));
|
||||||
memcpy(iobject_desc, iobject_table, objects * sizeof(*iobject_table));
|
memcpy(iobject_desc, iobject_table, objects * sizeof(*iobject_table));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user