[BACK]Return to pw_gensalt.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libcrypt

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libcrypt/pw_gensalt.c between version 1.6 and 1.7

version 1.6, 2007/01/17 23:24:22 version 1.7, 2009/01/18 12:15:27
Line 162  __gensalt_sha1(char *salt, size_t saltsi
Line 162  __gensalt_sha1(char *salt, size_t saltsi
          * The salt can be up to 64 bytes, but 8           * The salt can be up to 64 bytes, but 8
          * is considered enough for now.           * is considered enough for now.
          */           */
         if (n + 9 >= saltsiz)          if ((size_t)n + 9 >= saltsiz)
                 return 0;                  return 0;
         __crypt_to64(&salt[n], arc4random(), 4);          __crypt_to64(&salt[n], arc4random(), 4);
         __crypt_to64(&salt[n + 4], arc4random(), 4);          __crypt_to64(&salt[n + 4], arc4random(), 4);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

CVSweb <webmaster@jp.NetBSD.org>