fix list traversal bug in update_dcb()

This caused the kernel to hang when loading NETDRIVE.SYS
This commit is contained in:
Bernd Böckmann 2024-08-05 20:19:34 +02:00 committed by Kenneth J Davis
parent ed2fd81927
commit 42980dfe7d

View File

@ -567,7 +567,7 @@ STATIC VOID update_dcb(struct dhdr FAR * dhp)
{ {
struct dpb FAR *tmp_dpb; struct dpb FAR *tmp_dpb;
/* find current end of dpb chain by following next pointers to end */ /* 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] */ /* insert into chain [at end] */
tmp_dpb->dpb_next = dpb; tmp_dpb->dpb_next = dpb;