suggestion from Dan Riley <dsr at mail.lns.cornell.edu>. Better
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 16 May 2005 18:41:40 +0000 (18:41 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 16 May 2005 18:41:40 +0000 (18:41 +0000)
fix from Ion Badulescu: use [FHSIZE-sizeof(u_int)] which is the
actual size we use.

ChangeLog
amd/nfs_subr.c

index 714b1b072320125d80f359815a68d2844544fb98..e84af22cfdebe9567ed9a6b292ca5714b1c64d35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,9 @@
 
        * amd/nfs_subr.c: use [1] for out-of-band pointer at the end of
        struct am_fh, because it's the most portable method.  Bug fix
-       suggestion from Dan Riley <dsr at mail.lns.cornell.edu>.
+       suggestion from Dan Riley <dsr at mail.lns.cornell.edu>.  Better
+       fix from Ion Badulescu: use [FHSIZE-sizeof(u_int)] which is the
+       actual size we use.
 
        * amd/amfs_generic.c (amfs_lookup_mntfs): reset currently used
        def_opts to options given in -opts, appended with the /default
index 84a9a50fde42464ca9503fdb9bc4358c8c39be07..78b64aa490d14b359b22abe143873ef0f678941e 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: nfs_subr.c,v 1.30 2005/05/16 18:08:53 ezk Exp $
+ * $Id: nfs_subr.c,v 1.31 2005/05/16 18:41:40 ezk Exp $
  *
  */
 
@@ -74,10 +74,7 @@ struct am_fh {
       int fhh_pid;                             /* process id */
       int fhh_id;                              /* map id */
     } s;
-    /*
-     * path to am_node.  Use [1] because it's the most portable method.
-     */
-    char fhh_path[1];
+    char fhh_path[FHSIZE-sizeof(u_int)];       /* path to am_node */
   } u;
 };