From 42980dfe7d616e54ef691d1e240b0f996a22def7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20B=C3=B6ckmann?= Date: Mon, 5 Aug 2024 20:19:34 +0200 Subject: [PATCH] fix list traversal bug in update_dcb() This caused the kernel to hang when loading NETDRIVE.SYS --- kernel/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/main.c b/kernel/main.c index 6abab319..73a99ff0 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -567,7 +567,7 @@ STATIC VOID update_dcb(struct dhdr FAR * dhp) { struct dpb FAR *tmp_dpb; /* find current end of dpb chain by following next pointers to end */ - for (tmp_dpb = LoL->DPBp; (ULONG) tmp_dpb->dpb_next != 0xffffffffl; tmp_dpb = dpb->dpb_next) + for (tmp_dpb = LoL->DPBp; (ULONG) tmp_dpb->dpb_next != 0xffffffffl; tmp_dpb = tmp_dpb->dpb_next) ; /* insert into chain [at end] */ tmp_dpb->dpb_next = dpb;