diff options
Diffstat (limited to 'crypt/badsalttest.c')
-rw-r--r-- | crypt/badsalttest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypt/badsalttest.c b/crypt/badsalttest.c index da42ae5e1c..3e57cdd3b8 100644 --- a/crypt/badsalttest.c +++ b/crypt/badsalttest.c @@ -1,5 +1,5 @@ /* Test program for bad DES salt detection in crypt. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -61,6 +61,9 @@ do_test (void) tests[n - 1][1] = &page[pagesize - 1]; } + /* Mark cd as initialized before first call to crypt_r. */ + cd.initialized = 0; + for (size_t i = 0; i < n; i++) { if (crypt (tests[i][0], tests[i][1])) |