summaryrefslogtreecommitdiff
path: root/daemon/digest.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/digest.c')
-rw-r--r--daemon/digest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/digest.c b/daemon/digest.c
index 099ca49..d1cfe20 100644
--- a/daemon/digest.c
+++ b/daemon/digest.c
@@ -241,9 +241,10 @@ int digest_parse(char* header, ha_buffer_t* buf, digest_header_t* rec,
if(rec->nonce)
{
- void* d = ha_bufdec64(buf, rec->nonce, DIGEST_NONCE_LEN);
+ size_t len = DIGEST_NONCE_LEN;
+ void* d = ha_bufdec64(buf, rec->nonce, &len);
- if(d != NULL)
+ if(d && len == DIGEST_NONCE_LEN)
memcpy(nonce, d, DIGEST_NONCE_LEN);
}
}