nanojpeg: more thorough output address check

This prevents the experiment trying to read from invalid guest-system
addresses.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1846 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-10-26 14:27:32 +00:00
parent 34d89000cf
commit 05217d77d9

View File

@ -227,7 +227,7 @@ bool NanoJPEGExperiment::run()
log << "odd image size" << endl;
result->set_details("odd image size");
result->set_resulttype(result->BROKEN);
} else if (output_image_addr == 0) {
} else if (output_image_addr < addr_rodata_start || output_image_addr >= addr_bss_end) {
log << "odd image address" << endl;
result->set_details("odd image address");
result->set_resulttype(result->BROKEN);