Fix bug 7399 - SMB2: QUERY_DIRECTORY is returning invalid values.
authorJeremy Allison <jra@samba.org>
Thu, 13 May 2010 22:59:09 +0000 (15:59 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 13 May 2010 22:59:09 +0000 (15:59 -0700)
commit056f24ce24ab395cb6fff15cb068c8d8b1affef9
tree3020747e6654c811bf69de63f2add4d9e7caa705
parent49c8c130a0d08be7c869b9a63b5a37488003eac2
Fix bug 7399 - SMB2: QUERY_DIRECTORY is returning invalid values.

The end_data argument to smbd_dirptr_lanman2_entry() must include
the safety margin, as internally it's actually used to allow detection
of string name pushes that were truncated. Ensure space_remaining can
never go negative due to padding.

Jeremy.
source3/smbd/smb2_find.c
source3/smbd/trans2.c