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
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
July 2019
----- 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
22 participants
146 discussions
Start a n
N
ew thread
[reactos] 03/03: [NDIS] INIT/PAGE sections must be uppercase.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fcd00d412e215d8e62524…
commit fcd00d412e215d8e62524bf2e49133e0ecb5d182 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Jul 7 08:22:16 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Jul 7 08:22:16 2019 +0200 [NDIS] INIT/PAGE sections must be uppercase. --- sdk/include/ddk/ndis.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/include/ddk/ndis.h b/sdk/include/ddk/ndis.h index 916ba98e556..c5f1dd58514 100644 --- a/sdk/include/ddk/ndis.h +++ b/sdk/include/ddk/ndis.h @@ -4482,14 +4482,14 @@ NdisGetCurrentProcessorCpuUsage( * NDIS_INIT_FUNCTION(FunctionName) */ #define NDIS_INIT_FUNCTION(FunctionName) \ - alloc_text(init, FunctionName) + alloc_text(INIT, FunctionName) /* * VOID * NDIS_PAGABLE_FUNCTION(FunctionName) */ #define NDIS_PAGEABLE_FUNCTION(FunctionName) \ - alloc_text(page, FunctionName) + alloc_text(PAGE, FunctionName) #define NDIS_PAGABLE_FUNCTION NDIS_PAGEABLE_FUNCTION
5 years, 5 months
1
0
0
0
[reactos] 02/03: [PCI] The INIT section must be uppercase.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d9f9cb247cfab7692befe…
commit d9f9cb247cfab7692befe96b71bebdf7e5e424c5 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Fri Jul 5 17:38:04 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Jul 7 08:18:12 2019 +0200 [PCI] The INIT section must be uppercase. --- drivers/bus/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/pci/pci.c b/drivers/bus/pci/pci.c index 4933b591293..5395982747d 100644 --- a/drivers/bus/pci/pci.c +++ b/drivers/bus/pci/pci.c @@ -32,7 +32,7 @@ static NTSTATUS NTAPI PciPnpControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) // Make the initialization routines discardable, so that they // don't waste space -#pragma alloc_text(init, DriverEntry) +#pragma alloc_text(INIT, DriverEntry) #endif /* ALLOC_PRAGMA */
5 years, 5 months
1
0
0
0
[reactos] 01/03: [CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c4d8e2a6e9660c1f0d0d2…
commit c4d8e2a6e9660c1f0d0d24877219baca443bbce0 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sat Jun 29 19:24:28 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Jul 7 08:18:10 2019 +0200 [CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683 For MSVC, marking the section as discardable will do this automatically. For GCC, we use a linker script that places it after the .reloc section (which should be the last "real" section, check ld --verbose output for the default linker script). This fixes what seems to be a regression from r55835 (!). --- ntoskrnl/CMakeLists.txt | 2 ++ sdk/cmake/gcc.cmake | 1 + sdk/cmake/init-section.lds | 11 +++++++++++ sdk/cmake/msvc.cmake | 4 ++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt index 3111893fb05..5f2ac879316 100644 --- a/ntoskrnl/CMakeLists.txt +++ b/ntoskrnl/CMakeLists.txt @@ -31,12 +31,14 @@ set_subsystem(ntoskrnl native) if(MSVC) set_image_base(ntoskrnl 0x00400000) add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code + add_target_link_flags(ntoskrnl "/SECTION:INIT,D") else() if(GDB) set_image_base(ntoskrnl 0x00800000) else() set_image_base(ntoskrnl 0x80800000) endif() + add_linker_script(ntoskrnl ${REACTOS_SOURCE_DIR}/sdk/cmake/init-section.lds) endif() target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent) diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index f5c1ec10c69..c4c741ff6a6 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -318,6 +318,7 @@ function(set_module_type_toolchain MODULE TYPE) if(${TYPE} STREQUAL "wdmdriver") add_target_link_flags(${MODULE} "-Wl,--wdmdriver") endif() + add_linker_script(${MODULE} ${REACTOS_SOURCE_DIR}/sdk/cmake/init-section.lds) endif() if(STACK_PROTECTOR) diff --git a/sdk/cmake/init-section.lds b/sdk/cmake/init-section.lds new file mode 100644 index 00000000000..2b815150105 --- /dev/null +++ b/sdk/cmake/init-section.lds @@ -0,0 +1,11 @@ +/* Make sure the INIT section is at the end of the module so we can reclaim the space */ +SECTIONS +{ + INIT BLOCK(__section_alignment__) : + { + __init_start__ = . ; + *(INIT) + __init_end__ = . ; + } +} +INSERT AFTER .reloc; diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index f7dc1544cee..44b72771af0 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -327,9 +327,9 @@ function(set_module_type_toolchain MODULE TYPE) add_target_link_flags(${MODULE} "/DLL") elseif(${TYPE} STREQUAL "kernelmodedriver") # Disable linker warning 4078 (multiple sections found with different attributes) for INIT section use - add_target_link_flags(${MODULE} "/DRIVER /IGNORE:4078") + add_target_link_flags(${MODULE} "/DRIVER /IGNORE:4078 /SECTION:INIT,D") elseif(${TYPE} STREQUAL "wdmdriver") - add_target_link_flags(${MODULE} "/DRIVER:WDM /IGNORE:4078") + add_target_link_flags(${MODULE} "/DRIVER:WDM /IGNORE:4078 /SECTION:INIT,D") endif() if(RUNTIME_CHECKS)
5 years, 5 months
1
0
0
0
[reactos] 01/01: [USER32] Switch to only one window (Alt+Tab) (#1718)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c17a8770a31ab3c9fbbc2…
commit c17a8770a31ab3c9fbbc2a96bae6d55c057bd8b9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Jul 7 09:05:10 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Jul 7 09:05:10 2019 +0900 [USER32] Switch to only one window (Alt+Tab) (#1718) Fix app switcher (Alt+Tab)'s behavior when there is only one app window. CORE-16176 --- win32ss/user/user32/controls/appswitch.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/win32ss/user/user32/controls/appswitch.c b/win32ss/user/user32/controls/appswitch.c index 737663a17db..03531acfe85 100644 --- a/win32ss/user/user32/controls/appswitch.c +++ b/win32ss/user/user32/controls/appswitch.c @@ -481,11 +481,13 @@ BOOL ProcessHotKey(VOID) if (windowCount == 1) { - selectedWindow = 0; - CompleteSwitch(TRUE); - return TRUE; + MakeWindowActive(windowList[0]); + return FALSE; } + if (!CreateSwitcherWindow(User32Instance)) + return FALSE; + selectedWindow = 1; TRACE("[ATbot] HotKey Received. Opening window.\n"); @@ -610,10 +612,6 @@ LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) // Already in the loop. if (switchdialog || Esc) return 0; - hwndActive = GetActiveWindow(); - // Nothing is active so exit. - if (!hwndActive) return 0; - if (lParam == VK_ESCAPE) { Esc = TRUE; @@ -636,14 +634,15 @@ LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) } // Capture current active window. - SetCapture( hwndActive ); + hwndActive = GetActiveWindow(); + if (hwndActive) + SetCapture(hwndActive); switch (lParam) { case VK_TAB: - if( !CreateSwitcherWindow(User32Instance) ) goto Exit; - if( !GetDialogFont() ) goto Exit; - if( !ProcessHotKey() ) goto Exit; + if (!GetDialogFont() || !ProcessHotKey()) + goto Exit; break; case VK_ESCAPE: @@ -652,6 +651,10 @@ LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) default: goto Exit; } + + if (!hwndActive) + goto Exit; + // Main message loop: while (1) {
5 years, 5 months
1
0
0
0
[reactos] 01/01: [CRT] Remove mingwm10.dll usage in tls support code CORE-15491
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=28a0aa9ae84cacc71f9ed…
commit 28a0aa9ae84cacc71f9edae33b4de1e3697f9e76 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Thu Jul 4 23:06:51 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Jul 6 11:37:30 2019 +0200 [CRT] Remove mingwm10.dll usage in tls support code CORE-15491 --- sdk/lib/crt/startup/tlsmthread.c | 11 ----------- sdk/lib/crt/startup/tlssup.c | 30 ------------------------------ 2 files changed, 41 deletions(-) diff --git a/sdk/lib/crt/startup/tlsmthread.c b/sdk/lib/crt/startup/tlsmthread.c index fa11171fc48..9e77c34d7f1 100644 --- a/sdk/lib/crt/startup/tlsmthread.c +++ b/sdk/lib/crt/startup/tlsmthread.c @@ -20,11 +20,6 @@ extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *)); #ifndef _WIN64 -#define MINGWM10_DLL "mingwm10.dll" -typedef int (*fMTRemoveKeyDtor)(DWORD key); -typedef int (*fMTKeyDtor)(DWORD key, void (*dtor)(void *)); -extern fMTRemoveKeyDtor __mingw_gMTRemoveKeyDtor; -extern fMTKeyDtor __mingw_gMTKeyDtor; extern int __mingw_usemthread_dll; #endif @@ -36,8 +31,6 @@ __mingwthr_remove_key_dtor (DWORD key) #endif return ___w64_mingwthr_remove_key_dtor (key); #ifndef _WIN64 - if (__mingw_gMTRemoveKeyDtor) - return (*__mingw_gMTRemoveKeyDtor) (key); return 0; #endif } @@ -51,10 +44,6 @@ __mingwthr_key_dtor (DWORD key, void (*dtor)(void *)) if (!__mingw_usemthread_dll) #endif return ___w64_mingwthr_add_key_dtor (key, dtor); -#ifndef _WIN64 - if (__mingw_gMTKeyDtor) - return (*__mingw_gMTKeyDtor) (key, dtor); -#endif } return 0; } diff --git a/sdk/lib/crt/startup/tlssup.c b/sdk/lib/crt/startup/tlssup.c index 220678c1c15..e52a554536c 100644 --- a/sdk/lib/crt/startup/tlssup.c +++ b/sdk/lib/crt/startup/tlssup.c @@ -81,13 +81,7 @@ static __CRT_THREAD TlsDtorNode dtor_list_head; extern int _CRT_MT; #ifndef _WIN64 -#define MINGWM10_DLL "mingwm10.dll" -typedef int (*fMTRemoveKeyDtor)(DWORD key); -typedef int (*fMTKeyDtor)(DWORD key, void (*dtor)(void *)); -fMTRemoveKeyDtor __mingw_gMTRemoveKeyDtor; -fMTKeyDtor __mingw_gMTKeyDtor; int __mingw_usemthread_dll; -static HANDLE __mingw_mthread_hdll; #endif BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID); @@ -98,30 +92,6 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) _PVFV *pfunc; uintptr_t ps; -#ifndef _WIN64 - if (_winmajor < 4) - { - __mingw_usemthread_dll = 1; - __mingw_mthread_hdll = LoadLibrary (MINGWM10_DLL); - if (__mingw_mthread_hdll != NULL) - { - __mingw_gMTRemoveKeyDtor = (fMTRemoveKeyDtor) GetProcAddress (__mingw_mthread_hdll, "__mingwthr_remove_key_dtor"); - __mingw_gMTKeyDtor = (fMTKeyDtor) GetProcAddress (__mingw_mthread_hdll, "__mingwthr_key_dtor"); - } - if (__mingw_mthread_hdll == NULL || !__mingw_gMTRemoveKeyDtor || !__mingw_gMTKeyDtor) - { - __mingw_gMTKeyDtor = NULL; - __mingw_gMTRemoveKeyDtor = NULL; - if (__mingw_mthread_hdll) - FreeLibrary (__mingw_mthread_hdll); - __mingw_mthread_hdll = NULL; - _CRT_MT = 0; - return TRUE; - } - _CRT_MT = 1; - return TRUE; - } -#endif /* We don't let us trick here. */ if (_CRT_MT != 2) _CRT_MT = 2;
5 years, 5 months
1
0
0
0
[reactos] 01/01: [NTOS:MM] Fix MmSizeOfSystemCacheInPages value on AMD64
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6ba611f39e5bb750a24a4…
commit 6ba611f39e5bb750a24a4bbd149ddb788edbcc98 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Fri Jun 21 14:04:01 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jul 6 09:55:38 2019 +0200 [NTOS:MM] Fix MmSizeOfSystemCacheInPages value on AMD64 And add 'ASSERT(MmSystemCacheEnd == ...);'. Addendum to d56a24908908b574852091af0b8bd9dca7bc1165. CORE-14259 --- ntoskrnl/mm/ARM3/mminit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/mm/ARM3/mminit.c b/ntoskrnl/mm/ARM3/mminit.c index bcb8f1652ab..5e4bc303e01 100644 --- a/ntoskrnl/mm/ARM3/mminit.c +++ b/ntoskrnl/mm/ARM3/mminit.c @@ -2521,11 +2521,16 @@ MmArmInitSystem(IN ULONG Phase, /* Define limits for system cache */ #ifdef _M_AMD64 - MmSizeOfSystemCacheInPages = (MI_SYSTEM_CACHE_END - MI_SYSTEM_CACHE_START) / PAGE_SIZE; + MmSizeOfSystemCacheInPages = ((MI_SYSTEM_CACHE_END + 1) - MI_SYSTEM_CACHE_START) / PAGE_SIZE; #else MmSizeOfSystemCacheInPages = ((ULONG_PTR)MI_PAGED_POOL_START - (ULONG_PTR)MI_SYSTEM_CACHE_START) / PAGE_SIZE; #endif MmSystemCacheEnd = (PVOID)((ULONG_PTR)MmSystemCacheStart + (MmSizeOfSystemCacheInPages * PAGE_SIZE) - 1); +#ifdef _M_AMD64 + ASSERT(MmSystemCacheEnd == (PVOID)MI_SYSTEM_CACHE_END); +#else + ASSERT(MmSystemCacheEnd == (PVOID)((ULONG_PTR)MI_PAGED_POOL_START - 1)); +#endif /* Initialize the system cache */ //MiInitializeSystemCache(MmSystemCacheWsMinimum, MmAvailablePages);
5 years, 5 months
1
0
0
0
[reactos] 01/01: [FLOPPY_NEW] Fix MSVC builds
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4253ba71fc9e3a5720bbc…
commit 4253ba71fc9e3a5720bbc643e3573f30b8bd7041 Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Sat Jul 6 09:39:03 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jul 6 09:39:03 2019 +0200 [FLOPPY_NEW] Fix MSVC builds --- drivers/storage/floppy_new/floppy.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/storage/floppy_new/floppy.c b/drivers/storage/floppy_new/floppy.c index 3c9a1ebf9c0..01db49e5007 100644 --- a/drivers/storage/floppy_new/floppy.c +++ b/drivers/storage/floppy_new/floppy.c @@ -276,16 +276,16 @@ DISK_GEOMETRY FloppyGeometries[] = {{890,0}, F3_200Mb_512, 13, 34, 512}, {{262,0}, F3_240M_512, 32, 56, 512} #else - {{.LowPart = 80, .HighPart = 0}, F3_640_512, 2, 8, 512}, - {{.LowPart = 80, .HighPart = 0}, F3_720_512, 2, 9, 512}, - {{.LowPart = 80, .HighPart = 0}, F3_1Pt2_512, 2, 15, 512}, - {{.LowPart = 77, .HighPart = 0}, F3_1Pt23_1024, 2, 8, 1024}, - {{.LowPart = 80, .HighPart = 0}, F3_1Pt44_512, 2, 18, 512}, - {{.LowPart = 80, .HighPart = 0}, F3_1Pt44_512, 2, 21, 512}, // DMF -> F3_1Pt44_512 - {{.LowPart = 1024, .HighPart = 0}, F3_32M_512, 2, 32, 512}, - {{.LowPart = 963, .HighPart = 0}, F3_120M_512, 8, 32, 512}, - {{.LowPart = 890, .HighPart = 0}, F3_200Mb_512, 13, 34, 512}, - {{.LowPart = 262, .HighPart = 0}, F3_240M_512, 32, 56, 512} + {{{80,0}}, F3_640_512, 2, 8, 512}, + {{{80,0}}, F3_720_512, 2, 9, 512}, + {{{80,0}}, F3_1Pt2_512, 2, 15, 512}, + {{{77,0}}, F3_1Pt23_1024, 2, 8, 1024}, + {{{80,0}}, F3_1Pt44_512, 2, 18, 512}, + {{{80,0}}, F3_1Pt44_512, 2, 21, 512}, // DMF -> F3_1Pt44_512 + {{{1024,0}}, F3_32M_512, 2, 32, 512}, + {{{963,0}}, F3_120M_512, 8, 32, 512}, + {{{890,0}}, F3_200Mb_512, 13, 34, 512}, + {{{262,0}}, F3_240M_512, 32, 56, 512} #endif }; @@ -2516,10 +2516,11 @@ Return Value: #ifndef __REACTOS__ context = ExAllocatePool(NonPagedPoolNx, + sizeof(COMPLETION_CONTEXT)); #else context = ExAllocatePool(NonPagedPool, -#endif sizeof(COMPLETION_CONTEXT)); +#endif if (context == NULL) { @@ -3439,10 +3440,11 @@ Return Value: // #ifndef __REACTOS__ parameterList = ExAllocatePool(NonPagedPoolNx, + sizeof(FORMAT_UNIT_PARAMETER_LIST)); #else parameterList = ExAllocatePool(NonPagedPool, -#endif sizeof(FORMAT_UNIT_PARAMETER_LIST)); +#endif if (parameterList == NULL) {
5 years, 5 months
1
0
0
0
[reactos] 01/01: [IPHLPAPI] Use if_descrlen field for determining the length of if_descr in IFEntry structure. This fixes heap corruption on GCC8. CORE-16088
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=042646ceaccb13e2bea9b…
commit 042646ceaccb13e2bea9b2d9a06fadf284ecc0ab Author: Victor Perevertkin <victor(a)perevertkin.ru> AuthorDate: Sun Jun 30 15:34:46 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Fri Jul 5 22:49:12 2019 +0300 [IPHLPAPI] Use if_descrlen field for determining the length of if_descr in IFEntry structure. This fixes heap corruption on GCC8. CORE-16088 --- dll/win32/iphlpapi/ifenum_reactos.c | 18 +++++++++--------- dll/win32/iphlpapi/iphlpapi_main.c | 9 +++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dll/win32/iphlpapi/ifenum_reactos.c b/dll/win32/iphlpapi/ifenum_reactos.c index 8bbdd63a503..41958ea1361 100644 --- a/dll/win32/iphlpapi/ifenum_reactos.c +++ b/dll/win32/iphlpapi/ifenum_reactos.c @@ -97,13 +97,14 @@ NTSTATUS tdiGetMibForIfEntity entry->ent.if_speed, entry->ent.if_physaddrlen); TRACE(" if_physaddr .................... %02x:%02x:%02x:%02x:%02x:%02x\n" - " if_descr ....................... %s\n", + " if_descr ....................... %*s\n", entry->ent.if_physaddr[0] & 0xff, entry->ent.if_physaddr[1] & 0xff, entry->ent.if_physaddr[2] & 0xff, entry->ent.if_physaddr[3] & 0xff, entry->ent.if_physaddr[4] & 0xff, entry->ent.if_physaddr[5] & 0xff, + entry->ent.if_descrlen, entry->ent.if_descr); TRACE("} status %08x\n",status); @@ -332,7 +333,7 @@ NTSTATUS getInterfaceInfoByName( HANDLE tcpFile, char *name, IFInfo *info ) { if( NT_SUCCESS(status) ) { for( i = 0; i < numInterfaces; i++ ) { - if( !strcmp((PCHAR)ifInfo[i].if_info.ent.if_descr, name) ) { + if( !strncmp((PCHAR)ifInfo[i].if_info.ent.if_descr, name, ifInfo[i].if_info.ent.if_descrlen) ) { memcpy( info, &ifInfo[i], sizeof(*info) ); break; } @@ -352,20 +353,19 @@ const char *getInterfaceNameByIndex(DWORD index) { IFInfo ifInfo; HANDLE tcpFile; - char *interfaceName = 0, *adapter_name = 0; + char *interfaceName = NULL; NTSTATUS status = openTcpFile( &tcpFile, FILE_READ_DATA ); if( NT_SUCCESS(status) ) { status = getInterfaceInfoByIndex( tcpFile, index, &ifInfo ); if( NT_SUCCESS(status) ) { - adapter_name = (char *)ifInfo.if_info.ent.if_descr; - interfaceName = HeapAlloc( GetProcessHeap(), 0, - strlen(adapter_name) + 1 ); - if (!interfaceName) return NULL; - - strcpy( interfaceName, adapter_name ); + ifInfo.if_info.ent.if_descrlen + 1 ); + if( interfaceName ) { + memcpy(interfaceName, ifInfo.if_info.ent.if_descr, ifInfo.if_info.ent.if_descrlen); + interfaceName[ifInfo.if_info.ent.if_descrlen] = '\0'; + } } closeTcpFile( tcpFile ); diff --git a/dll/win32/iphlpapi/iphlpapi_main.c b/dll/win32/iphlpapi/iphlpapi_main.c index 242fb3bbd55..8bcde12b52b 100644 --- a/dll/win32/iphlpapi/iphlpapi_main.c +++ b/dll/win32/iphlpapi/iphlpapi_main.c @@ -3200,10 +3200,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG Family,ULONG Flags,PVO /* Friendly name */ if (!(Flags & GAA_FLAG_SKIP_FRIENDLY_NAME)) - requiredSize += strlen((char *)ifInfo.if_info.ent.if_descr) + 1; //FIXME + requiredSize += ifInfo.if_info.ent.if_descrlen + 1; //FIXME /* Adapter name */ - requiredSize += strlen((char *)ifInfo.if_info.ent.if_descr) + 1; + requiredSize += ifInfo.if_info.ent.if_descrlen + 1; /* Unicast address */ if (!(Flags & GAA_FLAG_SKIP_UNICAST)) @@ -3248,7 +3248,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG Family,ULONG Flags,PVO /* Adapter name */ currentAddress->AdapterName = (PVOID)currentLocation; - currentLocation += strlen((char *)ifInfo.if_info.ent.if_descr) + 1; + currentLocation += ifInfo.if_info.ent.if_descrlen + 1; /* Unicast address */ if (!(Flags & GAA_FLAG_SKIP_UNICAST)) @@ -3297,7 +3297,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG Family,ULONG Flags,PVO currentAddress->IfIndex = indexTable->indexes[i]; /* Adapter name */ - strcpy(currentAddress->AdapterName, (char *)ifInfo.if_info.ent.if_descr); + memcpy(currentAddress->AdapterName, ifInfo.if_info.ent.if_descr, ifInfo.if_info.ent.if_descrlen); + currentAddress->AdapterName[ifInfo.if_info.ent.if_descrlen] = '\0'; if (!(Flags & GAA_FLAG_SKIP_UNICAST)) {
5 years, 5 months
1
0
0
0
[reactos] 01/01: [PORTCLS] Zero memory in operator new. CORE-16157
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76e00fab7e959d4b4acd1…
commit 76e00fab7e959d4b4acd17dababc02f26c2208ef Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Fri Jul 5 17:26:16 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Fri Jul 5 17:31:46 2019 +0200 [PORTCLS] Zero memory in operator new. CORE-16157 Fixes a regression from 99fa38809fd8ed38d4d59fa1fcf3babb3216b895, which replaced the kcom.h/stdunk.h versions (which zero memory) with local implementations (which don't). Standard C++ does not guarantee that memory is zeroed but several classes rely on this, in particular for their m_Ref and m_bInitialized members. Ideally the constructors should be fixed to initialize all required members, but that task is error-prone so for now we simply restore the previous behavior. --- drivers/wdm/audio/backpln/portcls/dma_slave.cpp | 5 ++++- drivers/wdm/audio/backpln/portcls/miniport.cpp | 5 ++++- drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/wdm/audio/backpln/portcls/dma_slave.cpp b/drivers/wdm/audio/backpln/portcls/dma_slave.cpp index a68d2779128..4a0553b3ba8 100644 --- a/drivers/wdm/audio/backpln/portcls/dma_slave.cpp +++ b/drivers/wdm/audio/backpln/portcls/dma_slave.cpp @@ -24,7 +24,10 @@ public: POOL_TYPE PoolType, ULONG Tag) { - return ExAllocatePoolWithTag(PoolType, Size, Tag); + PVOID P = ExAllocatePoolWithTag(PoolType, Size, Tag); + if (P) + RtlZeroMemory(P, Size); + return P; } STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); diff --git a/drivers/wdm/audio/backpln/portcls/miniport.cpp b/drivers/wdm/audio/backpln/portcls/miniport.cpp index 526a012c7b1..8f00823770f 100644 --- a/drivers/wdm/audio/backpln/portcls/miniport.cpp +++ b/drivers/wdm/audio/backpln/portcls/miniport.cpp @@ -21,7 +21,10 @@ operator new( POOL_TYPE PoolType, ULONG Tag) { - return ExAllocatePoolWithTag(PoolType, Size, Tag); + PVOID P = ExAllocatePoolWithTag(PoolType, Size, Tag); + if (P) + RtlZeroMemory(P, Size); + return P; } void diff --git a/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp b/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp index 993ea92674b..e57fbefda74 100644 --- a/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp +++ b/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp @@ -25,7 +25,10 @@ public: POOL_TYPE PoolType, ULONG Tag) { - return ExAllocatePoolWithTag(PoolType, Size, Tag); + PVOID P = ExAllocatePoolWithTag(PoolType, Size, Tag); + if (P) + RtlZeroMemory(P, Size); + return P; } STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
5 years, 5 months
1
0
0
0
[reactos] 01/01: [GDI32_APITEST] Improve SetWorldTransform testcase (#1717)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=595ae4c551acbb7859dff…
commit 595ae4c551acbb7859dff58a845f348dfeb69310 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Jul 5 22:31:56 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Jul 5 22:31:56 2019 +0900 [GDI32_APITEST] Improve SetWorldTransform testcase (#1717) Improve the testcase for gdi32!SetWorldTransform function. CORE-15554 --- .../rostests/apitests/gdi32/SetWorldTransform.c | 63 ++++++++++++++-------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/modules/rostests/apitests/gdi32/SetWorldTransform.c b/modules/rostests/apitests/gdi32/SetWorldTransform.c index e8512e6dde2..cb82531513e 100644 --- a/modules/rostests/apitests/gdi32/SetWorldTransform.c +++ b/modules/rostests/apitests/gdi32/SetWorldTransform.c @@ -3,23 +3,24 @@ * LICENSE: GPL - See COPYING in the top level directory * PURPOSE: Test for SetWorldTransform * PROGRAMMERS: Timo Kreuzer + * Katayama Hirofumi MZ */ #include "precomp.h" void Test_SetWorldTransform() { - HDC hdcScreen, hdc; - XFORM xform; - BOOL result; - //PGDI_TABLE_ENTRY pEntry; - //DC_ATTR* pdcattr; - - /* Create a DC */ - hdcScreen = GetDC(NULL); - hdc = CreateCompatibleDC(hdcScreen); - ReleaseDC(NULL, hdcScreen); - SetGraphicsMode(hdc, GM_ADVANCED); + HDC hdcScreen, hdc; + XFORM xform; + BOOL result; + //PGDI_TABLE_ENTRY pEntry; + //DC_ATTR* pdcattr; + + /* Create a DC */ + hdcScreen = GetDC(NULL); + hdc = CreateCompatibleDC(hdcScreen); + ReleaseDC(NULL, hdcScreen); + SetGraphicsMode(hdc, GM_ADVANCED); /* Set identity transform */ xform.eM11 = 1; @@ -70,15 +71,15 @@ void Test_SetWorldTransform() result = GetWorldTransform(hdc, &xform); ok(result == 1, "GetWorldTransform should succeed\n"); ok(xform.eM11 == 2, "xform.eM11 should be 2\n"); - ok(xform.eM12 == (FLOAT)3.0001, "xform.eM11 should be 3.0001\n"); - ok(xform.eM21 == 4, "xform.eM11 should be 4\n"); - ok(xform.eM22 == 6, "xform.eM11 should be 6\n"); + ok(xform.eM12 == (FLOAT)3.0001, "xform.eM12 should be 3.0001\n"); + ok(xform.eM21 == 4, "xform.eM21 should be 4\n"); + ok(xform.eM22 == 6, "xform.eM22 should be 6\n"); /* Set smallest possible values */ - xform.eM11 = (FLOAT)1.4e-45; + xform.eM11 = 1.17549435e-38f; xform.eM12 = 0; xform.eM21 = 0; - xform.eM22 = (FLOAT)1.4e-45; + xform.eM22 = 1.17549435e-38f; ok(xform.eM11 != (FLOAT)0.0, "xform.eM11 shouldn't be 0.0\n"); ok(xform.eM22 != (FLOAT)0.0, "xform.eM22 shouldn't be 0.0\n"); ok(xform.eM11 * xform.eM22 != (FLOAT)0.0, "xform.eM12 * xform.eM21 shouldn't be 0.0\n"); @@ -89,15 +90,35 @@ void Test_SetWorldTransform() result = GetWorldTransform(hdc, &xform); ok(result == 1, "GetWorldTransform should succeed\n"); ok(xform.eM11 > 0, "xform.eM11 should not be 0\n"); - ok(xform.eM12 == 0, "xform.eM11 should be 0\n"); - ok(xform.eM21 == 0, "xform.eM11 should be 0\n"); - ok(xform.eM22 > 0, "xform.eM11 should not be 0\n"); + ok(xform.eM12 == 0, "xform.eM12 should be 0\n"); + ok(xform.eM21 == 0, "xform.eM21 should be 0\n"); + ok(xform.eM22 > 0, "xform.eM22 should not be 0\n"); + + xform.eM11 = 0; + xform.eM12 = 1; + xform.eM21 = 1; + xform.eM22 = 0; + result = SetWorldTransform(hdc, &xform); + ok_int(result, 1); + + xform.eM11 = 1; + xform.eM12 = 1; + xform.eM21 = 1; + xform.eM22 = 1; + result = SetWorldTransform(hdc, &xform); + ok_int(result, 0); - DeleteDC(hdc); + result = GetWorldTransform(hdc, &xform); + ok_int(result, 1); + ok(xform.eM11 == 0, "xform.eM11 should be 0\n"); + ok(xform.eM12 == 1, "xform.eM12 should be 1\n"); + ok(xform.eM21 == 1, "xform.eM21 should be 1\n"); + ok(xform.eM22 == 0, "xform.eM22 should be 0\n"); + + DeleteDC(hdc); } START_TEST(SetWorldTransform) { Test_SetWorldTransform(); } -
5 years, 5 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200