DEVEL15-windows-smb-parse-ascii-block-20090119
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Jan 2009 04:36:07 +0000 (04:36 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Jan 2009 04:36:07 +0000 (04:36 +0000)
commit9036c075b77ec262130e650d65bc048a565269f2
tree0dbee33255d4a6141292ff630fa34150b55936c7
parent258a75ad90bea435a998eff1fc06673e62d53cd4
DEVEL15-windows-smb-parse-ascii-block-20090119

LICENSE MIT

smb_ParseASCIIBlock() may be called with more than just data
type ASCII (0x4).  If the type is 2, 3, or 4 the data field is
a null terminated string.  If the type is 1 or 5 the data field
is a counted string.  if the type is 2 the data field is never
Unicode.

In any case, if the type is unrecognized smb_ParseASCIIBlock()
will return NULL and all of the callers must be prepared to handle
it.  If the return is NULL, the smb request will fail with
CM_ERROR_BADSMB.

(cherry picked from commit a0fd9b17334333e257ae9c476c4fbf85ee9fec95)
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c