diff options
author | Martin Etnestad <martin.etnestad@appeartv.com> | 2018-01-12 09:04:38 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-28 09:36:28 -0500 |
commit | 2d06fd839d2d0846cf6e47ecebbf646b486e5570 (patch) | |
tree | e9dbb709c943119ea575d3cb6627dbe32b3d2e1a | |
parent | 5b893baf0835d0a741023b74ef1ec8d9c8873965 (diff) |
Initialize SHA buffer size var in passwd_abort
The call to hash_block in passwd_abort fails with error ENOSPC on some
systems. The reason is that the variable which specifies the size of the
buffer to contain the computed hash does not get initialized.
This patch initializes the variable with the size of the buffer.
Signed-off-by: Martin Etnestad <martin.etnestad@appeartv.com>
-rw-r--r-- | common/autoboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/autoboot.c b/common/autoboot.c index a011865028..2eef7a04cc 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -57,7 +57,7 @@ static int passwd_abort(uint64_t etime) const char *algo_name = "sha256"; u_int presskey_len = 0; int abort = 0; - int size; + int size = sizeof(sha); int ret; if (sha_env_str == NULL) |