* amd/nfs_subr.c: check for NULL pointer before dereferencing it
authorIon Badulescu <ib42@cs.columbia.edu>
Tue, 17 May 2005 15:05:23 +0000 (15:05 +0000)
committerIon Badulescu <ib42@cs.columbia.edu>
Tue, 17 May 2005 15:05:23 +0000 (15:05 +0000)
ChangeLog
NEWS
amd/nfs_subr.c

index 4969888736ed8e8123ca57d974fdab51e1e07111..3a9187242e951c9dc72f39cf6883c4ffcedd61dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-17  Ion Badulescu <ionut@moisil.badula.org>
+
+       * amd/nfs_subr.c: check for NULL pointer before dereferencing it
+
 2005-05-16  Erez Zadok  <ezk@cs.sunysb.edu>
 
        * minor new ports: powerpc-apple-darwin7.9.0.
diff --git a/NEWS b/NEWS
index 1c0ba0046d8fda117dd19c1dd15bd762e4f00aff..d5db8f00c4084a12a9d9b50ea54d2535fb19af53 100644 (file)
--- 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:
index 78b64aa490d14b359b22abe143873ef0f678941e..f2d71c75b8c004bbb6cb99c43360070da01d7590 100644 (file)
@@ -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;
 
   /*