From f6be8b5b61ebe1283583dda2d0e0e3c47c1d7ace Mon Sep 17 00:00:00 2001 From: Ion Badulescu Date: Tue, 17 May 2005 15:05:23 +0000 Subject: [PATCH] * amd/nfs_subr.c: check for NULL pointer before dereferencing it --- ChangeLog | 4 ++++ NEWS | 3 +++ amd/nfs_subr.c | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4969888..3a91872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-05-17 Ion Badulescu + + * amd/nfs_subr.c: check for NULL pointer before dereferencing it + 2005-05-16 Erez Zadok * minor new ports: powerpc-apple-darwin7.9.0. diff --git a/NEWS b/NEWS index 1c0ba00..d5db8f0 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ just says "netbsd." - minor new ports: powerpc-apple-darwin7.9.0 +- bugs fixed: + * silly (and nasty) null pointer dereferencing + *** Notes specific to am-utils version 6.1-rc4 - bugs fixed: diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c index 78b64aa..f2d71c7 100644 --- a/amd/nfs_subr.c +++ b/amd/nfs_subr.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: nfs_subr.c,v 1.31 2005/05/16 18:41:40 ezk Exp $ + * $Id: nfs_subr.c,v 1.32 2005/05/17 15:05:23 ib42 Exp $ * */ @@ -672,7 +672,7 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) * then the old node has been timed out and * a new one allocated. */ - if (ap->am_gen != fp->fhh_gen) + if (ap != NULL && ap->am_gen != fp->fhh_gen) ap = 0; /* -- 2.43.0