https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a10f6c7a0ce2b311027f4…
commit a10f6c7a0ce2b311027f4460063a25db5ff3b094
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun May 20 13:53:11 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun May 20 13:53:43 2018 +0200
[FASTFAT] Fail if allocating the stream FO fails.
---
drivers/filesystems/fastfat/dirwr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c
index cffc7af031..ab5d9b3ee4 100644
--- a/drivers/filesystems/fastfat/dirwr.c
+++ b/drivers/filesystems/fastfat/dirwr.c
@@ -47,6 +47,11 @@ vfatFCBInitializeCacheFromVolume(
}
fileObject = IoCreateStreamFileObject (NULL, vcb->StorageDevice);
+ if (fileObject == NULL)
+ {
+ status = STATUS_INSUFFICIENT_RESOURCES;
+ goto Quit;
+ }
#ifdef KDBG
if (DebugFile.Buffer != NULL && FsRtlIsNameInExpression(&DebugFile,
&fcb->LongNameU, FALSE, NULL))