summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/syscall_emul.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 504add35f..87899abca 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1004,6 +1004,9 @@ mmapFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
int tgt_fd = p->getSyscallArg(tc, index);
// int offset = p->getSyscallArg(tc, index);
+ if (length > 0x100000000ULL)
+ warn("mmap length argument %#x is unreasonably large.\n", length);
+
if (!(flags & OS::TGT_MAP_ANONYMOUS)) {
Process::FdMap *fd_map = p->sim_fd_obj(tgt_fd);
if (!fd_map || fd_map->fd < 0) {