Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mopd/mopd Fix bin/11253: seg-fault in mopd



details:   https://anonhg.NetBSD.org/src/rev/694e1328f2fc
branches:  trunk
changeset: 499409:694e1328f2fc
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 19 16:40:16 2000 +0000

description:
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 <kwellsch%tampabay.rr.com@localhost>

diffstat:

 usr.sbin/mopd/mopd/process.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 60aef84b9aaf -r 694e1328f2fc usr.sbin/mopd/mopd/process.c
--- a/usr.sbin/mopd/mopd/process.c      Sun Nov 19 15:32:24 2000 +0000
+++ b/usr.sbin/mopd/mopd/process.c      Sun Nov 19 16:40:16 2000 +0000
@@ -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 <sys/cdefs.h>
 #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 @@
        if (slot == -1)
                return;
 
+       dle = &dllist[slot];
+
        if ((new_count == ((dle->count+1) % 256))) {
                dle->loadaddr = dllist[slot].nloadaddr;
                dle->count    = new_count;



Home | Main Index | Thread Index | Old Index