From: Ryan Tandy Date: Tue, 7 Apr 2020 18:19:21 +0000 (-0700) Subject: ITS#9206 Initialize libsodium before calling its functions X-Git-Tag: OPENLDAP_REL_ENG_2_4_50~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=511ad09878d90f04f3c0f0eace4d0b921a7efd53;p=thirdparty%2Fopenldap.git ITS#9206 Initialize libsodium before calling its functions --- diff --git a/contrib/slapd-modules/passwd/argon2/pw-argon2.c b/contrib/slapd-modules/passwd/argon2/pw-argon2.c index e273943c85..0ffb6cdb08 100644 --- a/contrib/slapd-modules/passwd/argon2/pw-argon2.c +++ b/contrib/slapd-modules/passwd/argon2/pw-argon2.c @@ -175,6 +175,12 @@ int init_module( int argc, char *argv[] ) { int i; +#ifndef SLAPD_ARGON2_USE_ARGON2 + if ( sodium_init() == -1 ) { + return -1; + } +#endif + for ( i=0; i < argc; i++ ) { char *p; unsigned long value;