Fix several problems with lookasides and temporary captures:
authorArt Yerkes <art.yerkes@gmail.com>
Fri, 25 Jul 2008 13:42:05 +0000 (13:42 +0000)
committerArt Yerkes <art.yerkes@gmail.com>
Fri, 25 Jul 2008 13:42:05 +0000 (13:42 +0000)
commit6ae9a993753ac6a4dc55a817f1a29411e14037d9
tree07ee01a8590fd0c6e52c8c221d299c874c0afc59
parent4e945c229216175367138af632ac560efa19def5
Fix several problems with lookasides and temporary captures:
ob_x.h: Add a proper define for the size of a lookaside name buffer
oblink.c: Use move memory rather than copy in the case that we re-use the name
  buffer.  We probably never reused it before, because MaximumLength was never
  set properly.  See below.
oblife.c: Several things
  ObpCaptureObjectName
  - Properly set MaximumLength rather than copping out and setting it to just
    string + nul.  This was dangerous because later, we'll use MaximumLength
    to determine whether we allocated the name from the lookaside list or the
    heap.
  - Since we use MaximumLength to determine where the allocation came from
    make sure that MaximumLength never equals the magic value if the string
    comes from the heap for whatever reason.
  - Free the string using the right symmetry if we would fault copying.
  ObpCaptureObjectCreateInformation
  - We didn't allocate the ObjectCreateInfo, but we might've allocated the
    security descriptor, so free it if needed, rather than borking some non
    heap.

svn path=/trunk/; revision=34783
reactos/ntoskrnl/include/internal/ob_x.h
reactos/ntoskrnl/ob/oblife.c
reactos/ntoskrnl/ob/oblink.c