diff options
Diffstat (limited to 'librecrypt_hash_.c')
| -rw-r--r-- | librecrypt_hash_.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/librecrypt_hash_.c b/librecrypt_hash_.c index c66d4be..dc32df1 100644 --- a/librecrypt_hash_.c +++ b/librecrypt_hash_.c @@ -68,8 +68,10 @@ librecrypt_hash_(char *restrict out_buffer, size_t size, const char *phrase, siz /* Generate the salts */ r_len = librecrypt_realise_salts(out_buffer, size, settings, rng, NULL); if (r_len < 0) { - if (errno == ERANGE) + if (errno == ERANGE) { errno = ENOMEM; + return -1; + } return -1; } else if ((size_t)r_len >= size) { settings_scratch = malloc((size_t)r_len + 1u); |
