Module: wine
Branch: master
Commit: 7639ea31849e2fbc7654515818ecbc5ca53f9893
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7639ea31849e2fbc765451581…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com>
Date: Thu Jan 14 13:52:14 2010 -0600
winmm: Buffer size must be at least MMIO_DEFAULTBUFFER (8192) bytes.
mmioOpen() with the length of buffer set to 0 expects the buffer to be at least
MMIO_DEFAULTBUFFER (8192) bytes in size, and using buffer of smaller size can
lead to various problems when the buffer actually gets used.
---
dlls/winmm/tests/mmio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/winmm/tests/mmio.c b/dlls/winmm/tests/mmio.c
index 79ae031..d7218ea 100644
--- a/dlls/winmm/tests/mmio.c
+++ b/dlls/winmm/tests/mmio.c
@@ -199,7 +199,7 @@ static void test_mmioDescend(char *fname)
static void test_mmioOpen(char *fname)
{
- char buf[256];
+ char buf[MMIO_DEFAULTBUFFER];
MMRESULT ret;
HMMIO hmmio;
MMIOINFO mmio;
Module: wine
Branch: master
Commit: 72158ac286dfbf5908c2bc281678422469d0653b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72158ac286dfbf5908c2bc281…
Author: James Hawkins <truiken(a)gmail.com>
Date: Thu Jan 14 11:35:09 2010 -0800
Revert "advapi32: Free descriptor if it isn't returned from GetSecurityInfo().".
This reverts commit dbd76575ef8353484afa0b0d2da95760c26f34fe.
According to MSDN, ppSecurityDescriptor must not be NULL if any of the
SID or ACL parameters are non-NULL. This is wrong, and native
GetSecurityInfo will happily return those pointers, leaving one unable
to free the original security descriptor.
---
dlls/advapi32/security.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index babe468..821fb86 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -3118,8 +3118,11 @@ DWORD WINAPI GetSecurityInfo(
}
if (ppSecurityDescriptor)
*ppSecurityDescriptor = sd;
- else
- LocalFree(sd);
+
+ /* The security descriptor (sd) cannot be freed if ppSecurityDescriptor is
+ * NULL, because native happily returns the SIDs and ACLs that are requested
+ * in this case.
+ */
return ERROR_SUCCESS;
}