return 0;
if (offset + len > hfd->virtsize)
return 0;
+ if (offset > 0xffffffff && (uae_s64)offset < 0)
+ return 0;
return 1;
}
unaligned (cmd, offset64, len, hfd->ci.blocksize);
goto bad_len;
}
- if (len + offset64 > hfd->virtsize) {
+ if (len + offset64 > hfd->virtsize || (uae_s64)offset64 < 0) {
outofbounds (cmd, offset64, len, hfd->virtsize);
goto bad_len;
}
unaligned (cmd, offset64, len, hfd->ci.blocksize);
goto bad_len;
}
- if (len + offset64 > hfd->virtsize) {
+ if (len + offset64 > hfd->virtsize || (uae_s64)offset64 < 0) {
outofbounds (cmd, offset64, len, hfd->virtsize);
goto bad_len;
}