diff options
Diffstat (limited to 'daemon/digest.c')
-rw-r--r-- | daemon/digest.c | 5 |
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); } } |