* amd/nfs_subr.c (fh_to_mp3): Increased the n of strncpy()
authorDaniel Ottavio <ottavio@fsl.cs.sunysb.edu>
Wed, 30 Mar 2005 13:48:33 +0000 (13:48 +0000)
committerDaniel Ottavio <ottavio@fsl.cs.sunysb.edu>
Wed, 30 Mar 2005 13:48:33 +0000 (13:48 +0000)
to make sure it null terminates.

ChangeLog
amd/nfs_subr.c

index 1c7dafeb43e932c5cc4362687f08597c48c6fb95..ba95af50335a1bad4e274f829f7ef6d734c4d839 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-30  Daniel P. Ottavio  <dottavio@ic.sunysb.edu>
+
+       * amd/nfs_subr.c (fh_to_mp3): Increased the n of strncpy()
+       to make sure it null terminates.
+
 2005-03-29  Daniel P. Ottavio  <dottavio@ic.sunysb.edu>
 
        * amd/nfs_subr.c (fh_to_mp3): Fix memset bug. In this case
index b73c265dd1a38085a3192e40944e2b1ec484d565..c2988669efb58bc339736b6242b9c782aa59b7e4 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: nfs_subr.c,v 1.24 2005/03/30 04:57:39 ottavio Exp $
+ * $Id: nfs_subr.c,v 1.25 2005/03/30 13:48:33 ottavio Exp $
  *
  */
 
@@ -615,7 +615,7 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop)
   if (fp->fhh_type != 0) {
     /* New filehandle type */
     char *path = xmalloc(sizeof(*fhp) + 1);
-    strncpy(path, (char *) fhp, sizeof(*fhp));
+    strncpy(path, (char *) fhp, sizeof(*fhp) + 1);
     /* dlog("fh_to_mp3: new filehandle: %s", path); */
 
     ap = path_to_exported_ap(path);