git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd04af7
)
s3: Fix input check in is_encrypted_packet
author
Volker Lendecke
<vl@samba.org>
Wed, 6 Oct 2010 15:40:58 +0000
(17:40 +0200)
committer
Volker Lendecke
<vlendec@samba.org>
Fri, 8 Oct 2010 07:40:51 +0000
(07:40 +0000)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Oct 8 07:40:52 UTC 2010 on sn-devel-104
source3/smbd/seal.c
patch
|
blob
|
history
diff --git
a/source3/smbd/seal.c
b/source3/smbd/seal.c
index 0cf730ee4f849026632e33ec13c54d05a2dd06ca..1d8d4641e795b251dfc458ccb8ed557090ae2a97 100644
(file)
--- a/
source3/smbd/seal.c
+++ b/
source3/smbd/seal.c
@@
-55,7
+55,9
@@
bool is_encrypted_packet(const uint8_t *inbuf)
uint16_t enc_num;
/* Ignore non-session messages or non 0xFF'E' messages. */
- if(CVAL(inbuf,0) || !(inbuf[4] == 0xFF && inbuf[5] == 'E')) {
+ if(CVAL(inbuf,0)
+ || (smb_len(inbuf) < 8)
+ || !(inbuf[4] == 0xFF && inbuf[5] == 'E')) {
return false;
}