https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c59e2d20d9c8a42f3c944…
commit c59e2d20d9c8a42f3c94403282efcab1cbe20fd9
Author: Oleg Dubinskiy <oleg.dubinskij30(a)gmail.com>
AuthorDate: Mon Aug 26 11:16:49 2024 +0200
Commit: Oleg Dubinskiy <oleg.dubinskij30(a)gmail.com>
CommitDate: Mon Aug 26 11:16:49 2024 +0200
[NTOS:FSRTL] Check for the correct return status when inserting a new Filter Context entry
According to our declaration/definition, IoChangeFileObjectFilerContext returns NTSTATUS, not BOOLEAN. Zero return (which was actually checked before) for BOOLEAN means failure, but for NTSTATUS it's success. So it should (and now actually does) free and fail appropriately only in failure case, but not in success, when it shouldn't.
This fixes most of problems with fltmgr.sys driver from Windows XP/Server 2003 and a lot of 3rd party filter drivers which use it from many apps (Avast Free Antivirus all versions, Avira AntiVir Personal 8.2, Dr. Web Security Space 8.0, Kaspersky Antivirus 2012 etc. etc.).
CORE-14157, CORE-14635, CORE-19318
---
ntoskrnl/fsrtl/filtrctx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/fsrtl/filtrctx.c b/ntoskrnl/fsrtl/filtrctx.c
index 9bd616fad7a..a71475a93bc 100644
--- a/ntoskrnl/fsrtl/filtrctx.c
+++ b/ntoskrnl/fsrtl/filtrctx.c
@@ -176,6 +176,7 @@ FsRtlInsertPerFileObjectContext(IN PFILE_OBJECT FileObject,
IN PFSRTL_PER_FILEOBJECT_CONTEXT Ptr)
{
PFILE_OBJECT_FILTER_CONTEXTS FOContext = NULL;
+ NTSTATUS Status;
if (!FileObject)
{
@@ -203,7 +204,8 @@ FsRtlInsertPerFileObjectContext(IN PFILE_OBJECT FileObject,
InitializeListHead(&(FOContext->FilterContexts));
/* Set it */
- if (!IoChangeFileObjectFilterContext(FileObject, FOContext, TRUE))
+ Status = IoChangeFileObjectFilterContext(FileObject, FOContext, TRUE);
+ if (!NT_SUCCESS(Status))
{
/* If it fails, it means that someone else has set it in the meanwhile */
ExFreePoolWithTag(FOContext, 'FOCX');
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cca9acfa1d9d2bf258f34…
commit cca9acfa1d9d2bf258f34ea89b210d5e8fb0563d
Author: Whindmar Saksit <whindsaks(a)proton.me>
AuthorDate: Sat Aug 24 19:01:27 2024 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Aug 24 19:01:27 2024 +0200
[SHELL32] Create link must ask for a parsing name for file targets (#7267)
---
dll/win32/shell32/droptargets/CFSDropTarget.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dll/win32/shell32/droptargets/CFSDropTarget.cpp b/dll/win32/shell32/droptargets/CFSDropTarget.cpp
index f7694320f57..00c056acd8e 100644
--- a/dll/win32/shell32/droptargets/CFSDropTarget.cpp
+++ b/dll/win32/shell32/droptargets/CFSDropTarget.cpp
@@ -588,12 +588,19 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
/* We need to create a link for each pidl in the copied items, so step through the pidls from the clipboard */
for (UINT i = 0; i < lpcida->cidl; i++)
{
+ SFGAOF att = SHGetAttributes(psfFrom, apidl[i], SFGAO_FOLDER | SFGAO_STREAM | SFGAO_FILESYSTEM);
CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidlFull;
hr = SHILCombine(pidl, apidl[i], &pidlFull);
WCHAR targetName[MAX_PATH];
if (SUCCEEDED(hr))
- hr = Shell_DisplayNameOf(psfFrom, apidl[i], SHGDN_FOREDITING | SHGDN_INFOLDER, targetName, _countof(targetName));
+ {
+ // If the target is a file, we use SHGDN_FORPARSING because "NeverShowExt" will hide the ".lnk" extension.
+ // If the target is a virtual item, we ask for the friendly name because SHGDN_FORPARSING will return a GUID.
+ BOOL UseParsing = (att & (SFGAO_FILESYSTEM | SFGAO_FOLDER)) == SFGAO_FILESYSTEM;
+ DWORD ShgdnFor = UseParsing ? SHGDN_FORPARSING : SHGDN_FOREDITING;
+ hr = Shell_DisplayNameOf(psfFrom, apidl[i], ShgdnFor | SHGDN_INFOLDER, targetName, _countof(targetName));
+ }
if (FAILED_UNEXPECTEDLY(hr))
{
SHELL_ErrorBox(m_hwndSite, hr);
@@ -605,7 +612,6 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
PathCombineW(wszCombined, m_sPathTarget, targetName);
// Check to see if the source is a link
- SFGAOF att = SHGetAttributes(psfFrom, apidl[i], SFGAO_FOLDER | SFGAO_STREAM | SFGAO_FILESYSTEM);
BOOL fSourceIsLink = FALSE;
if (!wcsicmp(PathFindExtensionW(targetName), L".lnk") && (att & (SFGAO_FOLDER | SFGAO_STREAM)) != SFGAO_FOLDER)
{
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5506a8e17062ad5f2b826…
commit 5506a8e17062ad5f2b826f6331fadc69810d031c
Author: Joachim Henze <joachim.henze(a)reactos.org>
AuthorDate: Sat Aug 24 06:04:48 2024 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Aug 24 06:04:48 2024 +0200
[MSPAINT] it-IT.rc: Fix compiler warning (#7270)
GCC8.4.0dbg warns about:
C:/ros/reactos/base/applications/mspaint/lang/it-IT.rc:267: unrecognized escape sequence
Fix that.
the regression was introduced by
0.4.15-dev-8555-g fbcbbd8768b8a3dda9013dfe3553867176c521b1 from (#7248)
---
base/applications/mspaint/lang/it-IT.rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/applications/mspaint/lang/it-IT.rc b/base/applications/mspaint/lang/it-IT.rc
index d48250a1882..d7e62a67d1f 100644
--- a/base/applications/mspaint/lang/it-IT.rc
+++ b/base/applications/mspaint/lang/it-IT.rc
@@ -264,7 +264,7 @@ BEGIN
IDS_PERCENTAGE "La percentuale deve essere compresa tra 1 e 500."
IDS_ANGLE "L'angolo deve essere compreso tra -89 e 89."
IDS_LOADERRORTEXT "l file %s non può essere caricato."
- IDS_ENLARGEPROMPTTEXT "L'immagine negli appunti è più grande della tela.\La si vuole allargare?"
+ IDS_ENLARGEPROMPTTEXT "L'immagine negli appunti è più grande della tela.\nLa si vuole allargare?"
IDS_BOLD "Grossivo"
IDS_ITALIC "Italico"
IDS_UNDERLINE "Sottolineato"