]> sourceware.org Git - glibc.git/commitdiff
crypt: Fix badsalttest test (Bug 22765)
authorIl'ya Malakhov <ilmalakhov@yandex.ru>
Wed, 31 Jan 2018 22:32:19 +0000 (14:32 -0800)
committerCarlos O'Donell <carlos@redhat.com>
Thu, 1 Feb 2018 08:02:49 +0000 (00:02 -0800)
The value of 'cd.initialized' is left uninitialized before the
first invocation of 'crypt_r ()' in this test despite the fact
that it should be set to zero according to the API.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
ChangeLog
crypt/badsalttest.c

index b2cec4fea2b4a88e59b0efde4e42e1f192138166..a5847a5a23d9e7bb98e0e12ca59183fd3dd094cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-31  Il'ya Malakhov  <ilmalakhov@yandex.ru>
+
+       [BZ #22765]
+       * crypt/badsalttest.c (do_test): Set cd.initialized to 0.
+
 2018-01-31  Dmitry V. Levin  <ldv@altlinux.org>
 
        * manual/install.texi (Tools for Compilation): Update the newest
index 6c5230c399e2553f75f37fe68d428bd1c1463b2e..3e57cdd3b8bacf8f90d7f72254a951622a7ee2c2 100644 (file)
@@ -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]))
This page took 0.076072 seconds and 5 git commands to generate.