ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2019
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
31 participants
300 discussions
Start a n
N
ew thread
[reactos] 01/01: [APPCOMPAT] Run apps in compatibility with 6.1 SP1 (7 SP1), 6.2 (8) and 6.3 (8.1) (#1273)
by Denis Malikov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bcfd350e9fb053ba8fb8b…
commit bcfd350e9fb053ba8fb8bbf86c2ae3107a17c819 Author: Denis Malikov <Getequ(a)users.noreply.github.com> AuthorDate: Sun Jan 27 23:30:37 2019 +0700 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jan 27 17:30:37 2019 +0100 [APPCOMPAT] Run apps in compatibility with 6.1 SP1 (7 SP1), 6.2 (8) and 6.3 (8.1) (#1273) --- dll/appcompat/shims/layer/versionlie.c | 4 ++++ dll/shellext/acppage/CLayerUIPropPage.cpp | 3 +++ media/sdb/sysmain.xml | 15 +++++++++++++++ modules/rostests/apitests/appshim/versionlie.c | 2 ++ 4 files changed, 24 insertions(+) diff --git a/dll/appcompat/shims/layer/versionlie.c b/dll/appcompat/shims/layer/versionlie.c index 38db1d0a19..a1a18dc092 100644 --- a/dll/appcompat/shims/layer/versionlie.c +++ b/dll/appcompat/shims/layer/versionlie.c @@ -47,6 +47,7 @@ VersionLieInfo g_WinVistaSP1 = { 0x17710006, 6, 0, 6001, VER_PLATFORM_WIN32_NT, VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, 2, 0 }; VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win7SP1 = { 0x1db10106, 6, 1, 7601, VER_PLATFORM_WIN32_NT, 1, 0 }; VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 }; VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 }; @@ -230,6 +231,9 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA lpOsVersionI #define VERSION_INFO g_Win7RTM #include "versionlie.inl" +#define SHIM_NS Win7SP1VersionLie +#define VERSION_INFO g_Win7SP1 +#include "versionlie.inl" #define SHIM_NS Win8RTMVersionLie #define VERSION_INFO g_Win8RTM diff --git a/dll/shellext/acppage/CLayerUIPropPage.cpp b/dll/shellext/acppage/CLayerUIPropPage.cpp index a60f03ef2f..fdc34e8bbb 100644 --- a/dll/shellext/acppage/CLayerUIPropPage.cpp +++ b/dll/shellext/acppage/CLayerUIPropPage.cpp @@ -38,6 +38,9 @@ static struct { { L"Windows Vista (SP1)", L"VISTASP1" }, { L"Windows Vista (SP2)", L"VISTASP2" }, { L"Windows 7", L"WIN7RTM" }, + { L"Windows 7 (SP1)", L"WIN7SP1" }, + { L"Windows 8", L"WIN8RTM" }, + { L"Windows 8.1", L"WIN81RTM" }, { NULL, NULL } }; diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml index 1dd096d2b0..472cded8f6 100644 --- a/media/sdb/sysmain.xml +++ b/media/sdb/sysmain.xml @@ -173,6 +173,15 @@ <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> + <SHIM NAME="Win7SP1VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <INCLUDE MODULE="msi.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> + <DLLFILE>aclayers.dll</DLLFILE> + </SHIM> <SHIM NAME="Win8RTMVersionLie"> <INCLUDE MODULE="shell32.dll" /> <INCLUDE MODULE="msi.dll" /> @@ -319,6 +328,12 @@ <DATA NAME="SHIMVERSIONNT" DATA_DWORD="601" /> <!-- TODO: Add more fixes! --> </LAYER> + <LAYER NAME="WIN7SP1"> + <!-- ReactOS specific. Windows does not have this version lie --> + <SHIM_REF NAME="Win7SP1VersionLie" /> + <DATA NAME="SHIMVERSIONNT" DATA_DWORD="601" /> + <!-- TODO: Add more fixes! --> + </LAYER> <LAYER NAME="WIN8RTM"> <SHIM_REF NAME="Win8RTMVersionLie" /> <DATA NAME="SHIMVERSIONNT" DATA_DWORD="602" /> diff --git a/modules/rostests/apitests/appshim/versionlie.c b/modules/rostests/apitests/appshim/versionlie.c index 43c9dc665c..328190668b 100644 --- a/modules/rostests/apitests/appshim/versionlie.c +++ b/modules/rostests/apitests/appshim/versionlie.c @@ -281,6 +281,7 @@ VersionLieInfo g_WinVistaSP1 = { 0x17710006, 6, 0, 6001, VER_PLATFORM_WIN32_NT, VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, 2, 0 }; VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win7SP1 = { 0x1db10106, 6, 1, 7601, VER_PLATFORM_WIN32_NT, 1, 0 }; /* ReactOS specific. Windows does not have this version lie */ VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 }; VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 }; @@ -400,6 +401,7 @@ START_TEST(versionlie) run_test("VistaSP1VersionLie", &g_WinVistaSP1); run_test("VistaSP2VersionLie", &g_WinVistaSP2); run_test("Win7RTMVersionLie", &g_Win7RTM); + run_test("Win7SP1VersionLie", &g_Win7SP1); /* ReactOS specific. Windows does not have this version lie */ run_test("Win8RTMVersionLie", &g_Win8RTM); run_test("Win81RTMVersionLie", &g_Win81RTM); }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [MOUNTMGR] Fix MSVC build after commit 53abbb06.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6c49bdff2669494f0132…
commit b6c49bdff2669494f013283cd1a197d503675db8 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Jan 27 15:49:06 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jan 27 16:09:54 2019 +0100 [MOUNTMGR] Fix MSVC build after commit 53abbb06. --- drivers/filters/mountmgr/mntmgr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/filters/mountmgr/mntmgr.h b/drivers/filters/mountmgr/mntmgr.h index dacbfa7d69..b92698fdea 100644 --- a/drivers/filters/mountmgr/mntmgr.h +++ b/drivers/filters/mountmgr/mntmgr.h @@ -176,6 +176,7 @@ extern UNICODE_STRING Volume; extern KEVENT UnloadEvent; extern LONG Unloading; +INIT_FUNCTION DRIVER_INITIALIZE DriverEntry; VOID
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32SS][NTGDI] Delete magic number 565
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e7b222f4c5f552ef7a01f…
commit e7b222f4c5f552ef7a01fa4a66bbf73188e41441 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 20:54:19 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Jan 27 20:54:19 2019 +0900 [WIN32SS][NTGDI] Delete magic number 565 --- win32ss/gdi/ntgdi/bitmaps.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c index b12603d754..c98259967e 100644 --- a/win32ss/gdi/ntgdi/bitmaps.c +++ b/win32ss/gdi/ntgdi/bitmaps.c @@ -617,12 +617,6 @@ NtGdiSetBitmapBits( return 0; } - /* 565 is confirmed value in Win2k3 */ - if (Bytes >= 565) - { - return 0; - } - if (GDI_HANDLE_IS_STOCKOBJ(hBitmap)) { return 0;
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Check bit pattern of pvBits (#1315)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc7501638917e84ed7c02…
commit cc7501638917e84ed7c0263406ed4539e9553fe9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 20:25:15 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 20:25:15 2019 +0900 [WIN32KNT_APITEST] Check bit pattern of pvBits (#1315) CORE-15657 --- modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index 88b572041d..21d1f1f01f 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -294,6 +294,8 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); + ok_long(*(LPDWORD)pvBits, 0); + DeleteObject(hBitmap); DeleteDC(hDC); @@ -393,6 +395,8 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); + ok_long(*(LPDWORD)pvBits, 0x33AAAAAA); + DeleteObject(hBitmap); DeleteDC(hDC); }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Test large buffers without relying on stack layout. (#1314)
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8f69c63de41eb633b31a…
commit c8f69c63de41eb633b31aaad9ed99ea722bd3ce1 Author: Thomas Faber <18138474+ThFabba(a)users.noreply.github.com> AuthorDate: Sun Jan 27 12:08:52 2019 +0100 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Jan 27 20:08:52 2019 +0900 [WIN32KNT_APITEST] Test large buffers without relying on stack layout. (#1314) CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 72 ++++------------------ 1 file changed, 12 insertions(+), 60 deletions(-) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index fa668acf04..88b572041d 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -14,6 +14,7 @@ START_TEST(NtGdiSetBitmapBits) HDC hDC; BITMAPINFO bmi; LPVOID pvBits; + LPBYTE LargeBits; SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(0, 0, 0), 0); @@ -77,57 +78,32 @@ START_TEST(NtGdiSetBitmapBits) ok_long(NtGdiSetBitmapBits(hBitmap, 100, Bits), 12); ok_long(GetLastError(), 0xDEADFACE); - /* Test huge bytes count */ - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); + /* Test large byte counts */ + LargeBits = VirtualAlloc(NULL, 0x100000 + PAGE_SIZE, MEM_RESERVE, PAGE_NOACCESS); + VirtualAlloc(LargeBits, 0x100000, MEM_COMMIT, PAGE_READWRITE); + CopyMemory(LargeBits, Bits, sizeof(Bits)); SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 0x100, Bits), 0xC); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x100, LargeBits), 0xC); ok_long(GetLastError(), 0xDEADFACE); SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0xC); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x1000, LargeBits), 0xC); ok_long(GetLastError(), 0xDEADFACE); SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x10000, LargeBits), 0xC); ok_long(GetLastError(), 0xDEADFACE); - { - BYTE dummy[256] = { 1 }; - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0xC); - ok_long(GetLastError(), 0xDEADFACE); - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - - ok_int(dummy[0], 1); - } - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x100000, LargeBits), 0xC); ok_long(GetLastError(), 0xDEADFACE); SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 0x8000, Bits), 0); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x100001, LargeBits), 0x0); ok_long(GetLastError(), 0xDEADFACE); - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 0xFFFF, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 0x10000, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - - /* Test negative bytes count */ - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, -5, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); + VirtualFree(LargeBits, 0, MEM_RELEASE); DeleteObject(hBitmap); @@ -143,7 +119,7 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[0], 0x55); FillMemory(Bits, sizeof(Bits), 0x55); - + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); ok_long(GetLastError(), 0xDEADFACE); @@ -220,14 +196,6 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x20); - ok_long(GetLastError(), 0xDEADFACE); - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - DeleteObject(hBitmap); /* ------------------------- */ @@ -326,14 +294,6 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234); - ok_long(GetLastError(), 0xDEADFACE); - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - DeleteObject(hBitmap); DeleteDC(hDC); @@ -433,14 +393,6 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234); - ok_long(GetLastError(), 0xDEADFACE); - - SetLastError(0xDEADFACE); - ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); - ok_long(GetLastError(), 0xDEADFACE); - DeleteObject(hBitmap); DeleteDC(hDC); }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32SS][NTGDI] Fix NtGdiSetBitmapBits in buffer size (#1313)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1cac3fbe6318e271f6a5b…
commit 1cac3fbe6318e271f6a5b4367480c3e5a1a2f188 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 17:44:34 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 17:44:34 2019 +0900 [WIN32SS][NTGDI] Fix NtGdiSetBitmapBits in buffer size (#1313) Let NtGdiSetBitmapBits function fail if buffer size was greater than 564. CORE-15657 --- win32ss/gdi/ntgdi/bitmaps.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c index c98259967e..b12603d754 100644 --- a/win32ss/gdi/ntgdi/bitmaps.c +++ b/win32ss/gdi/ntgdi/bitmaps.c @@ -617,6 +617,12 @@ NtGdiSetBitmapBits( return 0; } + /* 565 is confirmed value in Win2k3 */ + if (Bytes >= 565) + { + return 0; + } + if (GDI_HANDLE_IS_STOCKOBJ(hBitmap)) { return 0;
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for max buffer size 2 (#1312)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1ad9a1deabfdd592c4eed…
commit 1ad9a1deabfdd592c4eeda8059c5839dee646ffa Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 17:17:09 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 17:17:09 2019 +0900 [WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for max buffer size 2 (#1312) Improve NtGdiSetBitmapBits testcase again and again. CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index 4544c8de33..fa668acf04 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -94,6 +94,20 @@ START_TEST(NtGdiSetBitmapBits) ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); ok_long(GetLastError(), 0xDEADFACE); + { + BYTE dummy[256] = { 1 }; + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0xC); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + + ok_int(dummy[0], 1); + } + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0); ok_long(GetLastError(), 0xDEADFACE); @@ -206,6 +220,14 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x20); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + DeleteObject(hBitmap); /* ------------------------- */ @@ -304,6 +326,14 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + DeleteObject(hBitmap); DeleteDC(hDC); @@ -403,6 +433,14 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[3], 0x33); ok_int(Bits[4], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + DeleteObject(hBitmap); DeleteDC(hDC); }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for maximum buffer size (#1311)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e80e2051562f734256f3f…
commit e80e2051562f734256f3f58831fc81f5b8c0c37c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 16:35:53 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 16:35:53 2019 +0900 [WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for maximum buffer size (#1311) Improve NtGdiSetBitmapBits testcase by adding tests for maximum buffer size. CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index dcea8a8f8e..4544c8de33 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -82,6 +82,26 @@ START_TEST(NtGdiSetBitmapBits) ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0); ok_long(GetLastError(), 0xDEADFACE); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x100, Bits), 0xC); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0xC); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x8000, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 0xFFFF, Bits), 0); ok_long(GetLastError(), 0xDEADFACE);
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32SS][NTGDI] Alignment probe change in NtGdiSetBitmapBits (#1309)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b8f9c0c2b00e0fdec83b…
commit 6b8f9c0c2b00e0fdec83b8fc99bf1b3a1d7b47f2 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 16:11:23 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 16:11:23 2019 +0900 [WIN32SS][NTGDI] Alignment probe change in NtGdiSetBitmapBits (#1309) Don't check WORD alignment in NtGdiSetBitmapBits to match Win2k3 behaviour. CORE-15657 --- win32ss/gdi/ntgdi/bitmaps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c index e003640e9e..c98259967e 100644 --- a/win32ss/gdi/ntgdi/bitmaps.c +++ b/win32ss/gdi/ntgdi/bitmaps.c @@ -642,7 +642,8 @@ NtGdiSetBitmapBits( _SEH2_TRY { - ProbeForRead(pUnsafeBits, Bytes, sizeof(WORD)); + /* NOTE: Win2k3 doesn't check WORD alignment here. */ + ProbeForRead(pUnsafeBits, Bytes, 1); ret = UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
5 years, 12 months
1
0
0
0
[reactos] 01/01: [WIN32SS][NTGDI] Improve UnsafeGetBitmapBits and NtGdiGetBitmapBits (#1308)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=29795a2d72337259bc87f…
commit 29795a2d72337259bc87f77422c24e73f5fea545 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jan 27 15:51:33 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jan 27 15:51:33 2019 +0900 [WIN32SS][NTGDI] Improve UnsafeGetBitmapBits and NtGdiGetBitmapBits (#1308) CORE-15657 --- win32ss/gdi/ntgdi/bitmaps.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c index c0c587482a..e003640e9e 100644 --- a/win32ss/gdi/ntgdi/bitmaps.c +++ b/win32ss/gdi/ntgdi/bitmaps.c @@ -496,7 +496,7 @@ NtGdiGetBitmapDimension( } -VOID +LONG FASTCALL UnsafeGetBitmapBits( PSURFACE psurf, @@ -505,10 +505,10 @@ UnsafeGetBitmapBits( { PUCHAR pjDst, pjSrc; LONG lDeltaDst, lDeltaSrc; - ULONG nWidth, nHeight, cBitsPixel; + ULONG Y, iSrc, iDst, cbSrc, cbDst, nWidth, nHeight, cBitsPixel; nWidth = psurf->SurfObj.sizlBitmap.cx; - nHeight = psurf->SurfObj.sizlBitmap.cy; + nHeight = labs(psurf->SurfObj.sizlBitmap.cy); cBitsPixel = BitsPerFormat(psurf->SurfObj.iBitmapFormat); /* Get pointers */ @@ -516,14 +516,33 @@ UnsafeGetBitmapBits( pjDst = pvBits; lDeltaSrc = psurf->SurfObj.lDelta; lDeltaDst = WIDTH_BYTES_ALIGN16(nWidth, cBitsPixel); + NT_ASSERT(labs(lDeltaSrc) >= lDeltaDst); + + cbSrc = nHeight * labs(lDeltaSrc); + cbDst = nHeight * lDeltaDst; + Bytes = min(Bytes, cbDst); - while (nHeight--) + iSrc = iDst = 0; + for (Y = 0; Y < nHeight; Y++) { + if (iSrc + labs(lDeltaSrc) > cbSrc || iDst + lDeltaDst > Bytes) + { + LONG lDelta = min(cbSrc - iSrc, Bytes - iDst); + NT_ASSERT(lDelta >= 0); + RtlCopyMemory(pjDst, pjSrc, lDelta); + iDst += lDelta; + break; + } + /* Copy one line */ RtlCopyMemory(pjDst, pjSrc, lDeltaDst); pjSrc += lDeltaSrc; pjDst += lDeltaDst; + iSrc += labs(lDeltaSrc); + iDst += lDeltaDst; } + + return iDst; } LONG @@ -570,8 +589,7 @@ NtGdiGetBitmapBits( _SEH2_TRY { ProbeForWrite(pUnsafeBits, cjBuffer, 1); - UnsafeGetBitmapBits(psurf, cjBuffer, pUnsafeBits); - ret = cjBuffer; + ret = UnsafeGetBitmapBits(psurf, cjBuffer, pUnsafeBits); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
5 years, 12 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
30
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Results per page:
10
25
50
100
200