chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disobedience: don't crash if no password
[disorder]
/
lib
/
authhash.c
diff --git
a/lib/authhash.c
b/lib/authhash.c
index 7850c119c30a449c7fd3b0ae973d4a9a9219bf0b..a1012ba0e9ba570ee8c905dc4c2cf823d917b13a 100644
(file)
--- a/
lib/authhash.c
+++ b/
lib/authhash.c
@@
-23,6
+23,7
@@
#include <stddef.h>
#include <gcrypt.h>
#include <stddef.h>
#include <gcrypt.h>
+#include <assert.h>
#include "hex.h"
#include "log.h"
#include "hex.h"
#include "log.h"
@@
-36,7
+37,9
@@
const char *authhash(const void *challenge, size_t nchallenge,
const char *password) {
gcrypt_hash_handle h;
const char *res;
const char *password) {
gcrypt_hash_handle h;
const char *res;
-
+
+ assert(challenge != 0);
+ assert(password != 0);
#if HAVE_GCRY_ERROR_T
{
gcry_error_t e;
#if HAVE_GCRY_ERROR_T
{
gcry_error_t e;