From 0f85a0bd10097319b672b3c8b2778380c7bea904 Mon Sep 17 00:00:00 2001 From: Fabian Creutz Date: Sun, 10 Nov 2024 21:48:28 +0100 Subject: [PATCH] Add null check for resultDacl after calling GetSecurityDescriptorDacl Signed-off-by: Fabian Creutz --- src/libsync/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/filesystem.cpp b/src/libsync/filesystem.cpp index 7ff29ca4c1e85..2931a3d877c7e 100644 --- a/src/libsync/filesystem.cpp +++ b/src/libsync/filesystem.cpp @@ -371,7 +371,7 @@ bool FileSystem::setFolderPermissions(const QString &path, qCWarning(lcFileSystem) << "error when calling GetSecurityDescriptorDacl" << path << GetLastError(); return false; } - if (!daclPresent) { + if (!daclPresent || !resultDacl) { qCWarning(lcFileSystem) << "error when calling DACL needed to set a folder read-only or read-write is missing" << path; return false; }