windows-afsd-init-20041202
authorJeffrey Altman <jaltman@mit.edu>
Fri, 3 Dec 2004 01:26:14 +0000 (01:26 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 3 Dec 2004 01:26:14 +0000 (01:26 +0000)
Fix a memory overwrite condition caused when the BackConnectionHostNames
key does not exist

src/WINNT/afsd/afsd_init.c

index 2d3520b..9509f55 100644 (file)
@@ -170,7 +170,7 @@ void
 afsi_log(char *pattern, ...)
 {
     char s[256], t[100], d[100], u[512];
-    int zilch;
+    DWORD zilch;
     va_list ap;
     va_start(ap, pattern);
 
@@ -280,7 +280,7 @@ configureBackConnectionHostNames(void)
                 dwSize = 1;
             }
             pName = pHostNames;
-            StringCbCopyA(pName, size, strlen(cm_NetbiosName));
+            StringCbCopyA(pName, size, cm_NetbiosName);
             pName += size - 1;
             *pName = '\0';  /* add a second nul terminator */