mirror of
https://github.com/akuker/RASCSI.git
synced 2025-02-09 18:30:38 +00:00
Updated file size validation
This commit is contained in:
parent
548ae19fa5
commit
7ed22bf33b
@ -728,7 +728,7 @@ bool CreateImage(int fd, const PbCommand& command)
|
||||
catch(const out_of_range& e) {
|
||||
return ReturnStatus(fd, false, "Invalid image file size " + command.params().Get(1));
|
||||
}
|
||||
if (len < 256 || len & 0x1ff) {
|
||||
if (len < 512 || len & 0x1ff) {
|
||||
ostringstream error;
|
||||
error << "Invalid image file size " << len;
|
||||
return ReturnStatus(fd, false, error.str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user