Skip to content

Commit ad03647

Browse files
committed
Fix
1 parent b159fe4 commit ad03647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Services/Storage/StorageSecurityService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public unsafe WIN32_ERROR AddAce(string szPath, bool isFolder, string szSid)
198198
if (!bResult)
199199
return (WIN32_ERROR)Marshal.GetLastPInvokeError();
200200

201-
var cbNewDACL = aclSizeInfo.AclBytesInUse + aclSizeInfo.AclBytesFree + Marshal.SizeOf<ACCESS_ALLOWED_ACE>() * 2;
201+
var cbNewDACL = aclSizeInfo.AclBytesInUse + aclSizeInfo.AclBytesFree + Marshal.SizeOf<ACCESS_ALLOWED_ACE>() + 1024;
202202

203203
pNewDACL = (ACL*)PInvoke.LocalAlloc(LOCAL_ALLOC_FLAGS.LPTR, (nuint)cbNewDACL);
204204
if (pNewDACL == default)

0 commit comments

Comments
 (0)