From 627c573af25b602ac64c36b01c8163c592cbb494 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 26 Apr 2004 17:45:47 +0000 Subject: Debugging Fixes --- daemon/ntlm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'daemon/ntlm.c') 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); -- cgit v1.2.3