windows-smb-parse-ascii-block-20090119
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Jan 2009 04:35:53 +0000 (04:35 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Jan 2009 04:35:53 +0000 (04:35 +0000)
commita0fd9b17334333e257ae9c476c4fbf85ee9fec95
treeace9140ed75689fa53b33d73f558b681737d51d2
parente5a6c3f62dde6bc1b6a26957b866c3f27dc28c3a
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.
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c