tst: do not test for read-only buffer during Write when not on Win8+

This commit is contained in:
Bill Zissimopoulos 2016-07-28 16:37:49 -07:00
parent 0d8f0f9ac8
commit 35b9cb15a3

View File

@ -20,6 +20,7 @@
#include <sddl.h> #include <sddl.h>
#include <map> #include <map>
#include <cassert> #include <cassert>
#include <VersionHelpers.h>
/* /*
* Define the DEBUG_BUFFER_CHECK macro on Windows 8 or above. This includes * Define the DEBUG_BUFFER_CHECK macro on Windows 8 or above. This includes
@ -539,7 +540,8 @@ static NTSTATUS Write(FSP_FILE_SYSTEM *FileSystem,
__try __try
{ {
*P = *P | 0; *P = *P | 0;
assert(0); assert(!IsWindows8OrGreater());
/* only on Windows 8 we can make the buffer read-only! */
} }
__except (EXCEPTION_EXECUTE_HANDLER) __except (EXCEPTION_EXECUTE_HANDLER)
{ {