From: Fabian Creutz Date: Sun, 10 Nov 2024 20:48:28 +0000 (+0100) Subject: Add null check for resultDacl after calling GetSecurityDescriptorDacl X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~53^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0f85a0bd10097319b672b3c8b2778380c7bea904;p=nextcloud-desktop.git Add null check for resultDacl after calling GetSecurityDescriptorDacl Signed-off-by: Fabian Creutz --- diff --git a/src/libsync/filesystem.cpp b/src/libsync/filesystem.cpp index 7ff29ca4c..2931a3d87 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; }