summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Orton <joe@manyfish.uk>2023-01-23 17:28:24 +0000
committerJoe Orton <jorton@apache.org>2023-01-23 20:54:43 +0000
commita18a1628ad788934af5c3fde66a8bff20c5f9f48 (patch)
treede62bbbb5e6d010d4a7c84665ff210e3df31eb08
parentaab8ee6698aee79fffc9ee32f131ac36c3856c48 (diff)
downloadneon-git-a18a1628ad788934af5c3fde66a8bff20c5f9f48.tar.gz
* src/ne_auth.c (insert_challenge): Compare hash algorithm
strength correctly after d4f70fc3b25797041e57600893a93e5df20bc327 although it appears to work (usually?) correctly anyway.
-rw-r--r--src/ne_auth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c
index ee42641..a422d23 100644
--- a/src/ne_auth.c
+++ b/src/ne_auth.c
@@ -1385,7 +1385,8 @@ static void insert_challenge(struct auth_challenge **list, struct auth_challenge
if (chall->protocol->strength > cur->protocol->strength
|| (cur->protocol->id == NE_AUTH_DIGEST
&& chall->protocol->id == NE_AUTH_DIGEST
- && chall->alg > cur->alg)) {
+ && chall->alg && cur->alg
+ && chall->alg->hash > cur->alg->hash)) {
break;
}
}