From: Erez Zadok Date: Mon, 16 May 2005 18:41:40 +0000 (+0000) Subject: suggestion from Dan Riley . Better X-Git-Tag: am-utils-6_1_rc5~6 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=ef93ea83fd5df7f3a4678abfac1990586b7dce37;p=am-utils-6.2.git suggestion from Dan Riley . Better fix from Ion Badulescu: use [FHSIZE-sizeof(u_int)] which is the actual size we use. --- diff --git a/ChangeLog b/ChangeLog index 714b1b07..e84af22c 100644 --- 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 . + suggestion from Dan Riley . 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 diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c index 84a9a50f..78b64aa4 100644 --- a/amd/nfs_subr.c +++ b/amd/nfs_subr.c @@ -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; };