projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Actually comment out the parts of BN_MOD_MUL_WORD that I inteded to
[oweals/openssl.git]
/
apps
/
passwd.c
diff --git
a/apps/passwd.c
b/apps/passwd.c
index 5a7c99abd4dca0a011d4137107bd9a21e53ec378..e991fefaa5e0ad2cf49a47ab2c45f7991500a3bb 100644
(file)
--- a/
apps/passwd.c
+++ b/
apps/passwd.c
@@
-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;
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;
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 */
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 */
/* 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;
}
if (passwd_malloc == NULL)
goto err;
}
@@
-210,7
+212,7
@@
int MAIN(int argc, char **argv)
passwds = passwds_static;
if (in == NULL)
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;
}
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)
err:
ERR_print_errors(bio_err);
if (salt_malloc)
-
F
ree(salt_malloc);
+
OPENSSL_f
ree(salt_malloc);
if (passwd_malloc)
if (passwd_malloc)
-
F
ree(passwd_malloc);
+
OPENSSL_f
ree(passwd_malloc);
if (in)
BIO_free(in);
if (out)
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)
{
{
if (*salt_malloc_p == NULL)
{
- *salt_p = *salt_malloc_p =
M
alloc(3);
+ *salt_p = *salt_malloc_p =
OPENSSL_m
alloc(3);
if (*salt_malloc_p == NULL)
goto err;
}
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)
{
if (*salt_malloc_p == NULL)
{
- *salt_p = *salt_malloc_p =
M
alloc(9);
+ *salt_p = *salt_malloc_p =
OPENSSL_m
alloc(9);
if (*salt_malloc_p == NULL)
goto err;
}
if (*salt_malloc_p == NULL)
goto err;
}