Windows: initialize to zero Freelance fake root directory
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 2 May 2010 17:11:14 +0000 (13:11 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 2 May 2010 17:41:10 +0000 (10:41 -0700)
The Freelance fake root directory buffers were not zero-filled.
This results in random behavior that can cause the service to
terminate unexpectedly.

LICENSE MIT

Change-Id: If4e42f74bf07a7296319f3a73f8c7628de4e1fd8
Reviewed-on: http://gerrit.openafs.org/1885
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_freelance.c

index f512a1d..336cb5e 100644 (file)
@@ -219,7 +219,7 @@ void cm_InitFakeRootDir() {
     if (cm_fakeDirSize != dirSize) {
         if (cm_FakeRootDir)
             free(cm_FakeRootDir);
-        cm_FakeRootDir = malloc(dirSize);
+        cm_FakeRootDir = calloc(dirSize, 1);
         cm_fakeDirSize = dirSize;
     }