call-bzero-in-convertvolumeinfo-with-correct-size-for-dotreadonly-20060731
authorDerrick Brashear <shadow@dementia.org>
Mon, 31 Jul 2006 16:18:13 +0000 (16:18 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 31 Jul 2006 16:18:13 +0000 (16:18 +0000)
FIXES 36442

and slipstream in bzero() killing

src/vol/namei_ops.c

index a963cba..8cda06e 100644 (file)
@@ -1470,7 +1470,7 @@ convertVolumeInfo(fdr, fdw, vid)
                                 * the old RW volume around */
     p = strrchr(vd.name, '.');
     if (p && !strcmp(p, ".readonly")) {
-       bzero(p, 8);
+       memset(p, 0, 9);
     }
     if (write(fdw, &vd, sizeof(struct VolumeDiskData)) !=
        sizeof(struct VolumeDiskData)) {
@@ -1584,7 +1584,7 @@ namei_ConvertROtoRWvolume(IHandle_t * h, afs_uint32 vid)
      * proceed.
      */
 
-    bzero(&t_ih, sizeof(t_ih));
+    memset(&t_ih, 0, sizeof(t_ih));
     t_ih.ih_dev = h->ih_dev;
     t_ih.ih_vid = h->ih_vid;