From 97a23bcd8a55cdb692514f1248b4ce5e4ef7eec7 Mon Sep 17 00:00:00 2001 From: bot-1450 <103833334+bot-1450@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:43:55 +0800 Subject: [PATCH] Fix unassigned variable The `status` was never assigned a value if `FileAttributes` is neither `FILE_ATTRIBUTE_REPARSE_POINT` nor `FILE_ATTRIBUTE_DIRECTORY`. --- SandboxiePlus/QSbieAPI/Helpers/NtIO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SandboxiePlus/QSbieAPI/Helpers/NtIO.cpp b/SandboxiePlus/QSbieAPI/Helpers/NtIO.cpp index 25b0cc8d..d3c10f66 100644 --- a/SandboxiePlus/QSbieAPI/Helpers/NtIO.cpp +++ b/SandboxiePlus/QSbieAPI/Helpers/NtIO.cpp @@ -102,7 +102,7 @@ NTSTATUS NtIo_DeleteFolderRecursivelyImpl(POBJECT_ATTRIBUTES objattrs, bool (*cb NTSTATUS NtIo_DeleteFile(ULONG FileAttributes, OBJECT_ATTRIBUTES* attr, bool (*cb)(const WCHAR* info, void* param), void* param) { - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; if (FileAttributes & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) NtIo_RemoveProblematicAttributes(attr); @@ -380,4 +380,4 @@ NTSTATUS NtIo_MergeFolder(POBJECT_ATTRIBUTES src_objattrs, POBJECT_ATTRIBUTES de status = NtDeleteFile(src_objattrs); return status; -} \ No newline at end of file +}