From 8271683e44d8b77c75f1ce8582904e783e0c9500 Mon Sep 17 00:00:00 2001 From: beveloper Date: Sun, 22 Sep 2002 01:00:26 +0000 Subject: [PATCH] backport a bugfix from newos: another terrible bug that managed to exist this long and not clobber everything. The io vector table was being created with an incorrect size, so all sorts of garbage was getting written to whomever was allocated after it. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1112 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/int.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/int.c b/src/kernel/core/int.c index 049fb07c36..779e4dc5c2 100644 --- a/src/kernel/core/int.c +++ b/src/kernel/core/int.c @@ -42,11 +42,11 @@ int_init(kernel_args *ka) int int_init2(kernel_args *ka) { - io_vectors = (struct io_vector *)kmalloc(sizeof(struct io_vectors *) * NUM_IO_VECTORS); + io_vectors = (struct io_vector *)kmalloc(sizeof(struct io_vector) * NUM_IO_VECTORS); if (io_vectors == NULL) panic("int_init2: could not create io vector table!\n"); - memset(io_vectors, 0, sizeof(struct io_vector *) * NUM_IO_VECTORS); + memset(io_vectors, 0, sizeof(struct io_vector) * NUM_IO_VECTORS); return arch_int_init2(ka); }