From 325fbd57644bbd42071be327eaf8862f81860107 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 20 Nov 1998 16:43:08 +0000 Subject: careful with mmap off --- sys/dev/ksyms.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/ksyms.c b/sys/dev/ksyms.c index 61792499b2a..f9e3fcaf4a5 100644 --- a/sys/dev/ksyms.c +++ b/sys/dev/ksyms.c @@ -176,6 +176,8 @@ ksymsmmap(dev, off, prot) int off, prot; { #define ksyms_btop(x) ((vm_offset_t)(x) >> PGSHIFT + if (off < 0) + return (-1); if ((unsigned)off >= (unsigned)(esym - symtab) + k1->a_text) return (-1); -- cgit v1.2.3