diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-12 21:22:54 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-12 21:22:54 +0200 |
| commit | fc0b70a60407e1e65610712a702f8286db3a328c (patch) | |
| tree | 05f42c75245c1160c4bf7a7d391de7a16b109c83 /librecrypt_hash_.c | |
| parent | Misc (diff) | |
| download | librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.gz librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.bz2 librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.xz | |
Work on test code
Signed-off-by: Mattias Andrée <m@maandree.se>
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); |
