1d4b4b920b
Crypt::RandPasswd->random_chars_in_range(), Perl prepends the object name to the function's argument list. This causes the local variables $minlen, $maxlen, $lo_char, and $hi_char to be set incorrectly ($minlen is set to the object name, $maxlen is set to what should have been the minimum length, $lo_char is set to what should have been the maximum length, and $hi_char is set to what should have been the first character in the given range), so that the method returns an incorrect result. PR: ports/154207 Submitted by: Matthew X. Economou <xenophon+fbsdports@irtnog.org>
10 lines
360 B
Perl
10 lines
360 B
Perl
--- lib/Crypt/RandPasswd.pm.orig 2011-08-19 17:39:52.000000000 -0400
|
|
+++ lib/Crypt/RandPasswd.pm 2011-08-19 17:40:47.000000000 -0400
|
|
@@ -1466,6 +1466,7 @@
|
|
=cut
|
|
|
|
sub random_chars_in_range($$$$) {
|
|
+ @_ > 4 and shift;
|
|
my( $minlen, $maxlen, $lo_char, $hi_char ) = @_;
|
|
|
|
$minlen <= $maxlen or die "minlen $minlen is greater than maxlen $maxlen";
|