summaryrefslogtreecommitdiff
path: root/daemon/ntlm.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-04-26 17:45:47 +0000
committerStef Walter <stef@memberwebs.com>2004-04-26 17:45:47 +0000
commit627c573af25b602ac64c36b01c8163c592cbb494 (patch)
tree935f8fd15e6c47ce0a47164b4476583dc3e44c27 /daemon/ntlm.c
parent7ede8b330f777a0ff5c960eaecc1850b84289620 (diff)
Debugging Fixes
Diffstat (limited to 'daemon/ntlm.c')
-rw-r--r--daemon/ntlm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/daemon/ntlm.c b/daemon/ntlm.c
index 28284b9..736ac28 100644
--- a/daemon/ntlm.c
+++ b/daemon/ntlm.c
@@ -265,6 +265,8 @@ int ntlm_auth_ntlm(ntlm_context_t* ctx, void* key, const char* header,
ntlm_connection_t* conn = NULL;
unsigned int flags = 0;
int ret = HA_FALSE;
+ size_t len = 0;
+ void* d;
int r;
ASSERT(ctx && key && header && resp && buf);
@@ -288,13 +290,12 @@ int ntlm_auth_ntlm(ntlm_context_t* ctx, void* key, const char* header,
* is sending us.
*/
- ha_bufdec64(buf, header, 0);
- header = ha_bufdata(buf);
+ d = ha_bufdec64(buf, header, &len);
- if(ha_buferr(buf))
+ if(!d || len == 0)
goto finally;
- r = ntlmssp_decode_msg(&ntlmssp, ha_bufdata(buf), ha_buflen(buf), &flags);
+ r = ntlmssp_decode_msg(&ntlmssp, d, len, &flags);
if(r != 0)
{
ha_messagex(LOG_ERR, "decoding NTLM message failed (error %d)", r);