You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Marc Slemko <ma...@hyperreal.com> on 1997/02/19 09:08:39 UTC
cvs commit: apache/support dbmmanage.new
marc 97/02/19 00:08:38
Modified: support dbmmanage.new
Log:
Fix an off-by-one error in random string generation.
Submitted by: Vivek Khera <kh...@kci.kcilink.com>
Revision Changes Path
1.7 +1 -1 apache/support/dbmmanage.new
Index: dbmmanage.new
===================================================================
RCS file: /export/home/cvs/apache/support/dbmmanage.new,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** dbmmanage.new 1997/01/01 18:26:15 1.6
--- dbmmanage.new 1997/02/19 08:08:37 1.7
***************
*** 134,140 ****
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
while ($count--) {
# 64 = length($enc) in call to rand() below
! $str .= substr($enc,int(rand(64))+1,1);
}
$str;
}
--- 134,140 ----
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
while ($count--) {
# 64 = length($enc) in call to rand() below
! $str .= substr($enc,int(rand(64)),1);
}
$str;
}