Source-Changes-HG archive

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

[src/netbsd-3-0]: src/usr.sbin/rpc.lockd Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/483e9f95fd24
branches:  netbsd-3-0
changeset: 579461:483e9f95fd24
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Nov 19 21:09:38 2007 +0000

description:
Pull up following revision(s) (requested by tron in ticket #1873):
        usr.sbin/rpc.lockd/lock_proc.c: revision 1.8
Fix off-by-one error accessing "clnt_cache_addr" array which causes heap
corruption. This will hopefully fix PR bin/37236.

diffstat:

 usr.sbin/rpc.lockd/lock_proc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 159678494baa -r 483e9f95fd24 usr.sbin/rpc.lockd/lock_proc.c
--- a/usr.sbin/rpc.lockd/lock_proc.c    Sun Nov 04 12:44:27 2007 +0000
+++ b/usr.sbin/rpc.lockd/lock_proc.c    Mon Nov 19 21:09:38 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_proc.c,v 1.7 2000/10/11 20:23:56 is Exp $ */
+/*     $NetBSD: lock_proc.c,v 1.7.12.1 2007/11/19 21:09:38 bouyer Exp $        */
 
 /*
  * Copyright (c) 1995
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: lock_proc.c,v 1.7 2000/10/11 20:23:56 is Exp $");
+__RCSID("$NetBSD: lock_proc.c,v 1.7.12.1 2007/11/19 21:09:38 bouyer Exp $");
 #endif
 
 #include <sys/param.h>
@@ -237,7 +237,7 @@
        memcpy(&clnt_cache_addr[clnt_cache_next_to_use], host_addr,
            host_addr->sa_len);
        clnt_cache_time[clnt_cache_next_to_use] = time_now.tv_sec;
-       if (++clnt_cache_next_to_use > CLIENT_CACHE_SIZE)
+       if (++clnt_cache_next_to_use >= CLIENT_CACHE_SIZE)
                clnt_cache_next_to_use = 0;
 
        /*



Home | Main Index | Thread Index | Old Index