]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Ensure crypt schemes match with samples
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 11 Jan 2018 14:10:48 +0000 (16:10 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Mar 2018 09:24:07 +0000 (11:24 +0200)
src/auth/password-scheme-crypt.c

index 2ed8ee3de059f1e411194cae0bb28283f976ee83..db9b50c90ccca268ec185504e1c3b9f0f15f48cf 100644 (file)
@@ -183,6 +183,8 @@ void password_scheme_register_crypt(void)
        unsigned int i;
        const char *crypted;
 
+       i_assert(N_ELEMENTS(crypt_schemes) == N_ELEMENTS(sample));
+
        for (i = 0; i < N_ELEMENTS(crypt_schemes); i++) {
                crypted = mycrypt(sample[i].key, sample[i].salt);
                if (crypted != NULL &&