From 2c418924307422d41f81f6447f0260ad2748e3cf Mon Sep 17 00:00:00 2001 From: Matthew Kanwisher Date: Mon, 16 Dec 2013 17:52:44 -0500 Subject: [PATCH] ugh tracking down a nil pointer problem --- ntlm/ntlmv1.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ntlm/ntlmv1.go b/ntlm/ntlmv1.go index 840d224..637254c 100644 --- a/ntlm/ntlmv1.go +++ b/ntlm/ntlmv1.go @@ -221,6 +221,13 @@ func (n *V1ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e return err } + if am.Version == nil { + //UGH not entirely sure how this could possibly happen, going to put this in for now + //TODO investigate if this ever is really happening + am.Version = &VersionStruct{ProductMajorVersion: uint8(5), ProductMinorVersion: uint8(1), ProductBuild: uint16(2600), NTLMRevisionCurrent: uint8(15)} + log.Crit("Nil version in ntlmv1") + } + err = n.calculateKeys(am.Version.NTLMRevisionCurrent) if err != nil { return err