aboutsummaryrefslogtreecommitdiffstats
path: root/libsecauth_server_hash.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-13 01:40:16 +0200
committerMattias Andrée <maandree@kth.se>2021-04-13 01:40:16 +0200
commite0122e79c1f2b0a090ce1ba6bc7439f06fa1d237 (patch)
treeb99fe9384f2a5e8fc00494ee15b44fcad8df2b59 /libsecauth_server_hash.c
parentFirst commit (diff)
downloadsecauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.gz
secauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.bz2
secauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.xz
Make some fixes and add demos
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libsecauth_server_hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsecauth_server_hash.c b/libsecauth_server_hash.c
index 6f0d4f0..80f9318 100644
--- a/libsecauth_server_hash.c
+++ b/libsecauth_server_hash.c
@@ -15,7 +15,8 @@ libsecauth_server_hash(const struct libsecauth_spec *spec, const char *inhash, c
uint32_t rounds;
size_t i = 0;
- *resultp = NULL;
+ if (resultp)
+ *resultp = NULL;
memset(hashbuf, 0, sizeof(hashbuf));
for (i = 0, rounds = spec->server_rounds; rounds--; i ^= 1) {