You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1998/03/13 22:53:48 UTC

cvs commit: apache-1.2/support htpasswd.c

marc        98/03/13 13:53:47

  Modified:    support  Tag: APACHE_1_2_X htpasswd.c
  Log:
  Properly terminate the salt.
  
  PR: 1946
  Submitted by:   Matthew Reimer <mr...@vpop.net>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +1 -0      apache-1.2/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/support/htpasswd.c,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- htpasswd.c	1997/02/04 23:54:27	1.6
  +++ htpasswd.c	1998/03/13 21:53:46	1.6.2.1
  @@ -111,6 +111,7 @@
       }
       (void)srand((int)time((time_t *)NULL));
       to64(&salt[0],rand(),2);
  +    salt[2] = '\0';
       cpw = crypt(pw,salt);
       free(pw);
       fprintf(f,"%s:%s\n",user,cpw);