summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/ntlmssp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 0becc7fdee..6dd623047a 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -384,6 +384,11 @@ static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
void ntlmssp_weaken_keys(NTLMSSP_STATE *ntlmssp_state)
{
+ /* Nothing to weaken. We certainly don't want to 'extend' the length... */
+ if (!ntlmssp_state->session_key.length < 8) {
+ return;
+ }
+
/* Key weakening not performed on the master key for NTLM2
and does not occour for NTLM1. Therefore we only need
to do this for the LM_KEY.