Explorar o código

* Fix salt creation problem

svn: 3820
Bryan Drewery %!s(int64=18) %!d(string=hai) anos
pai
achega
ae01126acc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/binary.c

+ 1 - 1
src/binary.c

@@ -357,7 +357,7 @@ readcfg(const char *cfgfile)
     }
     make_rand_str(salt1, SALT1LEN);
     make_rand_str(salt2, SALT2LEN);
-    salt1[sizeof salt1] = salt2[sizeof salt2] = 0;
+    salt1[sizeof salt1 - 1] = salt2[sizeof salt2 - 1] = 0;
     fprintf(f, STR("SALT1 %s\n"), salt1);
     fprintf(f, STR("SALT2 %s\n"), salt2);
     fflush(f);