summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2009-11-30 16:33:21 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2009-11-30 16:33:21 +0000
commitcf21c1d2320a3fa6fc116068f48dd56ce7f6f2d2 (patch)
tree900122a1707425645c8033540923aef9ace8f393
parent204705514b4b2e5638e7836c13bb9ada8e73d624 (diff)
Bump up array size to prevent overflow when probing memory
on machines reporting > 32 memory regions. ok kettenis@
-rw-r--r--sys/arch/amd64/stand/libsa/memprobe.c4
-rw-r--r--sys/arch/i386/stand/libsa/memprobe.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/stand/libsa/memprobe.c b/sys/arch/amd64/stand/libsa/memprobe.c
index 4a6fdd8197d..6ea02157c16 100644
--- a/sys/arch/amd64/stand/libsa/memprobe.c
+++ b/sys/arch/amd64/stand/libsa/memprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memprobe.c,v 1.5 2006/09/18 21:15:33 mpf Exp $ */
+/* $OpenBSD: memprobe.c,v 1.6 2009/11/30 16:33:20 canacar Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -285,7 +285,7 @@ badprobe(bios_memmap_t *mp)
return ++mp;
}
-bios_memmap_t bios_memmap[32]; /* This is easier */
+bios_memmap_t bios_memmap[64]; /* This is easier */
#ifndef _TEST
void
memprobe(void)
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c
index ea7708ca4bc..b6d504fe73e 100644
--- a/sys/arch/i386/stand/libsa/memprobe.c
+++ b/sys/arch/i386/stand/libsa/memprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memprobe.c,v 1.45 2006/09/18 21:14:15 mpf Exp $ */
+/* $OpenBSD: memprobe.c,v 1.46 2009/11/30 16:33:20 canacar Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -288,7 +288,7 @@ badprobe(bios_memmap_t *mp)
return ++mp;
}
-bios_memmap_t bios_memmap[32]; /* This is easier */
+bios_memmap_t bios_memmap[64]; /* This is easier */
#ifndef _TEST
void
memprobe(void)