summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-26 02:08:41 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-26 02:08:41 +0000
commitc123c8454142d17d2884ae9dd951b7f2a0b1a343 (patch)
tree6de49a1ff7dd9460fd2d20ac74f8b8e9ecd5dcb1 /source4/libcli/auth
parente0ac659917066dbf7f8fdbcc7684ce2b49dd04d9 (diff)
downloadsamba-c123c8454142d17d2884ae9dd951b7f2a0b1a343.tar.gz
samba-c123c8454142d17d2884ae9dd951b7f2a0b1a343.tar.bz2
samba-c123c8454142d17d2884ae9dd951b7f2a0b1a343.zip
fixed some memory leaks in the dcerpc use of ntlmssp signing
(This used to be commit abbc9993b8f7eb9f57e079db1d0b170d0b9aa443)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index 11d63ec5f3..2f510b0f98 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -180,8 +180,10 @@ NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
DEBUG(0, ("NTLMSSP packet check failed with %s\n", nt_errstr(nt_status)));
return nt_status;
}
-
- if (memcmp(sig->data+sig->length - 8, local_sig.data+local_sig.length - 8, 8) != 0) {
+
+ if (local_sig.length != sig->length ||
+ memcmp(local_sig.data + local_sig.length - 8,
+ sig->data + sig->length - 8, 8) != 0) {
DEBUG(5, ("BAD SIG: wanted signature of\n"));
dump_data(5, (const char *)local_sig.data, local_sig.length);
@@ -192,6 +194,8 @@ NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
return NT_STATUS_ACCESS_DENIED;
}
+ data_blob_free(&local_sig);
+
/* increment counter on recieive */
ntlmssp_state->ntlmssp_seq_num++;