git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fa839f
)
Fix for crash bug freeing a non-malloc'ed buffer if the client sends a non-encrypted...
author
Volker Lendecke
<Volker.Lendecke@SerNet.DE>
Fri, 5 Dec 2008 21:21:19 +0000
(13:21 -0800)
committer
Michael Adam
<obnox@samba.org>
Tue, 16 Dec 2008 15:14:01 +0000
(16:14 +0100)
source/libsmb/smb_seal.c
patch
|
blob
|
history
diff --git
a/source/libsmb/smb_seal.c
b/source/libsmb/smb_seal.c
index a81ae9afd553643e3460f20334e873e2d32e5818..795c8bc14ca7984ec50bef5f97ad9aab8ac9bb16 100644
(file)
--- a/
source/libsmb/smb_seal.c
+++ b/
source/libsmb/smb_seal.c
@@
-388,10
+388,17
@@
void common_free_encryption_state(struct smb_trans_enc_state **pp_es)
void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf)
{
+ uint16_t enc_ctx_num;
+
if (!common_encryption_on(es)) {
return;
}
+ if (!NT_STATUS_IS_OK(get_enc_ctx_num((const uint8_t *)buf,
+ &enc_ctx_num))) {
+ return;
+ }
+
if (es->smb_enc_type == SMB_TRANS_ENC_NTLM) {
SAFE_FREE(buf);
return;