mirror of
https://github.com/tytso/pwgen.git
synced 2026-09-14 11:06:19 +05:00
Fix bug which would cause pwgen to loop forever if the password length
specified is 1.
This commit is contained in:
parent
3e36bedfea
commit
7e39a481cf
@ -1,3 +1,8 @@
|
||||
2006-01-15 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* pwgen.c (main): Fix bug which would cause pwgen to loop forever
|
||||
if the password length specified is 1.
|
||||
|
||||
2005-06-15 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* pw_phonemes.c (pw_phonemes): Allow one or more capital letters
|
||||
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -2,8 +2,10 @@ pwgen (2.04-2) unstable; urgency=low
|
||||
|
||||
* Add a udeb for debian-installer. Thanks to Martin Michlmayr for the
|
||||
patch. (Closes: #271115)
|
||||
* Fix bug which would cause pwgen to loop forever if the password length
|
||||
is 1.
|
||||
|
||||
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 15 Jan 2006 22:31:01 -0500
|
||||
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 15 Jan 2006 23:11:10 -0500
|
||||
|
||||
pwgen (2.04-1) unstable; urgency=low
|
||||
|
||||
|
||||
4
pwgen.c
4
pwgen.c
@ -158,6 +158,10 @@ int main(int argc, char **argv)
|
||||
pw_length = strtol(argv[optind], &tmp, 0);
|
||||
if (pw_length < 5)
|
||||
pwgen = pw_rand;
|
||||
if (pw_length <= 2)
|
||||
pwgen_flags &= ~PW_UPPERS;
|
||||
if (pw_length <= 1)
|
||||
pwgen_flags &= ~PW_DIGITS;
|
||||
if (*tmp) {
|
||||
fprintf(stderr, "Invalid password length: %s\n",
|
||||
argv[optind]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user