From 57113a6902fe34e8084996840d43bb58eb702169 Mon Sep 17 00:00:00 2001 From: bouyer Date: Sun, 19 Nov 2000 16:40:16 +0000 Subject: [PATCH] Fix bin/11253: seg-fault in mopd Once we found the correct slot, make sure dle points to it. dle was left pointing out of the array by the for(;;) loop. Fix from Ken Wellsch --- mopd/process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mopd/process.c b/mopd/process.c index a83a8d8..8e1b5db 100644 --- a/mopd/process.c +++ b/mopd/process.c @@ -1,4 +1,4 @@ -/* $NetBSD: process.c,v 1.9 2000/08/11 23:11:12 matt Exp $ */ +/* $NetBSD: process.c,v 1.10 2000/11/19 16:40:16 bouyer Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: process.c,v 1.9 2000/08/11 23:11:12 matt Exp $"); +__RCSID("$NetBSD: process.c,v 1.10 2000/11/19 16:40:16 bouyer Exp $"); #endif #include "os.h" @@ -357,6 +357,8 @@ mopNextLoad(dst, src, new_count, trans) if (slot == -1) return; + dle = &dllist[slot]; + if ((new_count == ((dle->count+1) % 256))) { dle->loadaddr = dllist[slot].nloadaddr; dle->count = new_count;