summaryrefslogtreecommitdiff
path: root/daemon/ntlm.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-08-17 22:54:16 +0000
committerStef Walter <stef@memberwebs.com>2004-08-17 22:54:16 +0000
commit4faa3b65abad58a20c5e7e401361d30188460a83 (patch)
tree5c6bd3f1f2c9cc65ec9fc8d6a22824cde8fc40a1 /daemon/ntlm.c
parent2888f640a34e34d5a85841976fb8937c4a7774a0 (diff)
Better message handling when buffer runs out of memory.
Diffstat (limited to 'daemon/ntlm.c')
-rw-r--r--daemon/ntlm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/daemon/ntlm.c b/daemon/ntlm.c
index ab6e5e4..8e1aa20 100644
--- a/daemon/ntlm.c
+++ b/daemon/ntlm.c
@@ -406,8 +406,8 @@ int ntlm_auth_ntlm(ha_request_t* rq, ntlm_context_t* ctx, void* key,
ha_bufenc64(rq->buf, (unsigned char*)&msg, sizeof(msg));
}
- if(ha_buferr(rq->buf))
- RETURN(HA_FALSE);
+ if(CHECK_RBUF(rq))
+ RETURN(HA_CRITERROR);
/*
* TODO: Our callers need to be able to keep alive
@@ -513,7 +513,7 @@ int ntlm_auth_ntlm(ha_request_t* rq, ntlm_context_t* ctx, void* key,
finally:
- if(ha_buferr(rq->buf))
+ if(CHECK_RBUF(rq))
ret = HA_CRITERROR;
if(conn)
@@ -759,7 +759,7 @@ int ntlm_process(ha_request_t* rq)
{
ha_bufmcat(rq->buf, HA_PREFIX_BASIC, "realm=\"", rq->context->realm, "\"", NULL);
- if(ha_buferr(rq->buf))
+ if(CHECK_RBUF(rq))
return HA_CRITERROR;
ha_addheader(rq, "WWW-Authenticate", ha_bufdata(rq->buf));