]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-test-torture-stack-overflow-20090405
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 5 Apr 2009 13:54:04 +0000 (13:54 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 5 Apr 2009 13:54:04 +0000 (13:54 +0000)
LICENSE MIT

avoid stack overflow.

src/WINNT/tests/torture/Source/nbio.c

index b00cac173254b1e5364a94dfc967d142c5cd4aa9..85a9b4b8a7701d6c77f3d067c749d2ffc7304455 100644 (file)
@@ -83,7 +83,7 @@ int FindHandle(int handle)
 int nb_unlink(char *fname)
 {
     int     rc;
-    char    temp[256];
+    char    temp[512];
     char    FileName[128];
     pstring path;
 
@@ -98,7 +98,7 @@ int nb_unlink(char *fname)
     if (!rc)
     {
         LeaveThread(0, "", CMD_UNLINK);
-        sprintf(temp, "FILE: DeleteFile %s failed GLE(0x%x)\n", fname, GetLastError());
+        sprintf(temp, "FILE: DeleteFile %s failed GLE(0x%x)\n", path, GetLastError());
         if (verbose)
             printf("%s", temp);
         LogMessage(ProcessNumber, HostName, FileName, temp, LogID);
@@ -949,7 +949,7 @@ static int total_deleted;
 void delete_fn(file_info *finfo, const char *name, void *state)
 {
     int     rc;
-    char    temp[256];
+    char    temp[512];
     char    s[1024];
     char    FileName[128];
 
@@ -1002,7 +1002,7 @@ int nb_deltree(char *dname)
     if (!rc)
     {
         char FileName[256];
-        char temp[128];
+        char temp[512];
         int  rc;
 
         rc = GetLastError();