From 75b8b6863ae15a059e5213cc6aeed7f975811daa Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 31 Jul 2020 22:47:20 +0200 Subject: [PATCH] kernel: Return after panic when freeing invalid interrupt range. The panic is continuable, but moving on with the free will overrun the array and corrupt memory. Change-Id: I9a5849a40158042150a25740ca57d711aee872bf Reviewed-on: https://review.haiku-os.org/c/haiku/+/3114 Reviewed-by: waddlesplash --- src/system/kernel/int.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/kernel/int.cpp b/src/system/kernel/int.cpp index e9e5a0c5fb..1cd125538b 100644 --- a/src/system/kernel/int.cpp +++ b/src/system/kernel/int.cpp @@ -696,6 +696,7 @@ free_io_interrupt_vectors(long count, long startVector) if (startVector + count > NUM_IO_VECTORS) { panic("invalid start vector %ld or count %ld supplied to " "free_io_interrupt_vectors\n", startVector, count); + return; } dprintf("free_io_interrupt_vectors: freeing %ld vectors starting "