Fix for 153245
authorjpierre%netscape.com
Wed, 17 Jul 2002 00:21:09 +0000
changeset 3328 f43a55d9730184ac05699a36ebc42a12621e9cbf
parent 3315 9943335f48e1972e18d1263af3968f35ccad1d2a (current diff)
parent 3316 44950cf416167feedb145bd4319ab697cfe3f18a (diff)
child 3329 76aa2ea14ad43936cde3d2ff946e06e33d3974cd
push idunknown
push userunknown
push dateunknown
bugs153245
Fix for 153245
security/nss/lib/freebl/os2_rand.c
--- a/security/nss/lib/freebl/os2_rand.c
+++ b/security/nss/lib/freebl/os2_rand.c
@@ -118,16 +118,17 @@ EnumSystemFiles(void (*func)(const char 
     ULONG               numFiles = 1;
     FILEFINDBUF3        fileBuf = {0};
     ULONG               buflen = sizeof(FILEFINDBUF3);
 
     if (DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, (PVOID)&sysInfo,
                         sizeof(ULONG)) == NO_ERROR)
     {
       bootLetter[0] = sysInfo + 'A' -1;
+      bootLetter[1] = '\0';
       strcpy(sysDir, bootLetter);
       strcpy(sysDir+1, ":\\OS2\\");
 
       strcpy( filename, sysDir );
       strcat( filename, "*.*" );
     }
 
     rc =DosFindFirst( filename, &hdir, FILE_NORMAL, &fileBuf, buflen,
@@ -168,17 +169,17 @@ ReadFiles(const char *file)
 {
     if ((dwNumFiles % dwReadEvery) == 0)
         RNG_FileForRNG(file);
 
     dwNumFiles++;
 }
 
 static void
-ReadSystemFiles()
+ReadSystemFiles(void)
 {
     // first count the number of files
     dwNumFiles = 0;
     if (!EnumSystemFiles(CountFiles))
         return;
 
     RNG_RandomUpdate(&dwNumFiles, sizeof(dwNumFiles));