Actually comment out the parts of BN_MOD_MUL_WORD that I inteded to
[oweals/openssl.git] / apps / passwd.c
index 5a7c99abd4dca0a011d4137107bd9a21e53ec378..e991fefaa5e0ad2cf49a47ab2c45f7991500a3bb 100644 (file)
@@ -63,6 +63,7 @@ int MAIN(int argc, char **argv)
        int in_stdin = 0;
        char *salt = NULL, *passwd = NULL, **passwds = NULL;
        char *salt_malloc = NULL, *passwd_malloc = NULL;
+       size_t passwd_malloc_size = 0;
        int pw_source_defined = 0;
        BIO *in = NULL, *out = NULL;
        int i, badopt, opt_done;
@@ -196,9 +197,10 @@ int MAIN(int argc, char **argv)
        if (passwds == NULL)
                {
                /* no passwords on the command line */
-#define PASSWD_MALLOC_SIZE (pw_maxlen + 2)
+
+               passwd_malloc_size = pw_maxlen + 2;
                /* longer than necessary so that we can warn about truncation */
-               passwd = passwd_malloc = Malloc(PASSWD_MALLOC_SIZE);
+               passwd = passwd_malloc = OPENSSL_malloc(passwd_malloc_size);
                if (passwd_malloc == NULL)
                        goto err;
                }
@@ -210,7 +212,7 @@ int MAIN(int argc, char **argv)
                
                passwds = passwds_static;
                if (in == NULL)
-                       if (EVP_read_pw_string(passwd_malloc, PASSWD_MALLOC_SIZE, "Password: ", 0) != 0)
+                       if (EVP_read_pw_string(passwd_malloc, passwd_malloc_size, "Password: ", 0) != 0)
                                goto err;
                passwds[0] = passwd_malloc;
                }
@@ -264,9 +266,9 @@ int MAIN(int argc, char **argv)
 err:
        ERR_print_errors(bio_err);
        if (salt_malloc)
-               Free(salt_malloc);
+               OPENSSL_free(salt_malloc);
        if (passwd_malloc)
-               Free(passwd_malloc);
+               OPENSSL_free(passwd_malloc);
        if (in)
                BIO_free(in);
        if (out)
@@ -397,7 +399,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
                        {
                        if (*salt_malloc_p == NULL)
                                {
-                               *salt_p = *salt_malloc_p = Malloc(3);
+                               *salt_p = *salt_malloc_p = OPENSSL_malloc(3);
                                if (*salt_malloc_p == NULL)
                                        goto err;
                                }
@@ -420,7 +422,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
                        
                        if (*salt_malloc_p == NULL)
                                {
-                               *salt_p = *salt_malloc_p = Malloc(9);
+                               *salt_p = *salt_malloc_p = OPENSSL_malloc(9);
                                if (*salt_malloc_p == NULL)
                                        goto err;
                                }