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] 14/21: [FREELDR] Use RtlStringCbPrintfA instead of sprintf
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f050e66fd51d2d035815…
commit 8f050e66fd51d2d03581558f26b6a6501c4c588b Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Apr 28 17:48:58 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [FREELDR] Use RtlStringCbPrintfA instead of sprintf Fixes GCC 8 warnings like: boot/freeldr/freeldr/disk/scsiport.c:806:31: error: 'partition(0)' directive writing 12 bytes into a region of size between 1 and 64 [-Werror=format-overflow=] sprintf(PartitionName, "%spartition(0)", ArcName); ^~~~~~~~~~~~ boot/freeldr/freeldr/disk/scsiport.c:806:5: note: 'sprintf' output between 13 and 76 bytes into a destination of size 64 sprintf(PartitionName, "%spartition(0)", ArcName); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- boot/freeldr/freeldr/disk/scsiport.c | 9 ++++++--- boot/freeldr/freeldr/include/freeldr.h | 1 + boot/freeldr/freeldr/linuxboot.c | 4 ++-- boot/freeldr/freeldr/ntldr/wlregistry.c | 12 ++++++------ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c index 7f206aafe65..0c0a0fa66cc 100644 --- a/boot/freeldr/freeldr/disk/scsiport.c +++ b/boot/freeldr/freeldr/disk/scsiport.c @@ -803,7 +803,7 @@ SpiScanDevice( CHAR PartitionName[64]; /* Register device with partition(0) suffix */ - sprintf(PartitionName, "%spartition(0)", ArcName); + RtlStringCbPrintfA(PartitionName, sizeof(PartitionName), "%spartition(0)", ArcName); FsRegisterDevice(PartitionName, &DiskVtbl); /* Read device partition table */ @@ -817,8 +817,11 @@ SpiScanDevice( { if (PartitionBuffer->PartitionEntry[i].PartitionType != PARTITION_ENTRY_UNUSED) { - sprintf(PartitionName, "%spartition(%lu)", - ArcName, PartitionBuffer->PartitionEntry[i].PartitionNumber); + RtlStringCbPrintfA(PartitionName, + sizeof(PartitionName), + "%spartition(%lu)", + ArcName, + PartitionBuffer->PartitionEntry[i].PartitionNumber); FsRegisterDevice(PartitionName, &DiskVtbl); } } diff --git a/boot/freeldr/freeldr/include/freeldr.h b/boot/freeldr/freeldr/include/freeldr.h index b62d4e56003..82a6b89f06b 100644 --- a/boot/freeldr/freeldr/include/freeldr.h +++ b/boot/freeldr/freeldr/include/freeldr.h @@ -50,6 +50,7 @@ #include <internal/hal.h> #include <drivers/pci/pci.h> #include <winerror.h> +#include <ntstrsafe.h> #else #include <ntsup.h> #endif diff --git a/boot/freeldr/freeldr/linuxboot.c b/boot/freeldr/freeldr/linuxboot.c index 54b16a62827..23258941eb8 100644 --- a/boot/freeldr/freeldr/linuxboot.c +++ b/boot/freeldr/freeldr/linuxboot.c @@ -341,7 +341,7 @@ BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile) CHAR StatusText[260]; PVOID LoadAddress; - sprintf(StatusText, "Loading %s", LinuxKernelName); + RtlStringCbPrintfA(StatusText, sizeof(StatusText), "Loading %s", LinuxKernelName); UiDrawStatusText(StatusText); /* Allocate memory for Linux kernel */ @@ -411,7 +411,7 @@ BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile) ULONG BytesLoaded; CHAR StatusText[260]; - sprintf(StatusText, "Loading %s", LinuxInitrdName); + RtlStringCbPrintfA(StatusText, sizeof(StatusText), "Loading %s", LinuxInitrdName); UiDrawStatusText(StatusText); // Allocate memory for the ramdisk diff --git a/boot/freeldr/freeldr/ntldr/wlregistry.c b/boot/freeldr/freeldr/ntldr/wlregistry.c index 155030dbc2d..3f813819dfc 100644 --- a/boot/freeldr/freeldr/ntldr/wlregistry.c +++ b/boot/freeldr/freeldr/ntldr/wlregistry.c @@ -586,15 +586,15 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead, { TRACE_CH(REACTOS, "ImagePath: not found\n"); TempImagePath[0] = 0; - sprintf(ImagePath, "%s\\system32\\drivers\\%S.sys", DirectoryPath, ServiceName); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%s\\system32\\drivers\\%S.sys", DirectoryPath, ServiceName); } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", DirectoryPath, TempImagePath); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%s%S", DirectoryPath, TempImagePath); } else { - sprintf(ImagePath, "%S", TempImagePath); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%S", TempImagePath); TRACE_CH(REACTOS, "ImagePath: '%s'\n", ImagePath); } @@ -666,15 +666,15 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead, { TRACE_CH(REACTOS, "ImagePath: not found\n"); TempImagePath[0] = 0; - sprintf(ImagePath, "%ssystem32\\drivers\\%S.sys", DirectoryPath, ServiceName); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%ssystem32\\drivers\\%S.sys", DirectoryPath, ServiceName); } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", DirectoryPath, TempImagePath); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%s%S", DirectoryPath, TempImagePath); } else { - sprintf(ImagePath, "%S", TempImagePath); + RtlStringCbPrintfA(ImagePath, sizeof(ImagePath), "%S", TempImagePath); TRACE_CH(REACTOS, "ImagePath: '%s'\n", ImagePath); } TRACE(" Adding boot driver: '%s'\n", ImagePath);
5 years, 5 months
1
0
0
0
[reactos] 13/21: [FASTFAT] Copy an entire field, instead of half-copying it with RtlCopyMemory
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=791b1ad7bd2bd836668f9…
commit 791b1ad7bd2bd836668f95b9ba897866d65138f3 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Apr 28 15:50:08 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [FASTFAT] Copy an entire field, instead of half-copying it with RtlCopyMemory Fixes GCC 8 warning: sdk/include/crt/mingw32/intrin_x86.h:76:12: error: 'memmove' offset [21, 40] from the object at 'DirContext' is out of the bounds of referenced subobject 'Attrib' with type 'unsigned char' at offset 19 [-Werror=array-bounds] return memmove(dest, source, num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ --- drivers/filesystems/fastfat/dirwr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c index db059e86cf4..2aec457057d 100644 --- a/drivers/filesystems/fastfat/dirwr.c +++ b/drivers/filesystems/fastfat/dirwr.c @@ -806,11 +806,9 @@ FATAddEntry( { RtlZeroMemory(pFatEntry, DeviceExt->FatInfo.BytesPerCluster); /* create '.' and '..' */ - RtlCopyMemory(&pFatEntry[0].Attrib, &DirContext.DirEntry.Fat.Attrib, - sizeof(FAT_DIR_ENTRY) - FIELD_OFFSET(FAT_DIR_ENTRY, Attrib)); + pFatEntry[0] = DirContext.DirEntry.Fat; RtlCopyMemory(pFatEntry[0].ShortName, ". ", 11); - RtlCopyMemory(&pFatEntry[1].Attrib, &DirContext.DirEntry.Fat.Attrib, - sizeof(FAT_DIR_ENTRY) - FIELD_OFFSET(FAT_DIR_ENTRY, Attrib)); + pFatEntry[1] = DirContext.DirEntry.Fat; RtlCopyMemory(pFatEntry[1].ShortName, ".. ", 11); }
5 years, 5 months
1
0
0
0
[reactos] 12/21: [FRAMEDYN] Fix broken asm (.code64 is for x64 only)
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3120320c65dc156976597…
commit 3120320c65dc15697659797cbc87e0b9ad2a43b4 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Apr 28 14:49:31 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [FRAMEDYN] Fix broken asm (.code64 is for x64 only) --- dll/win32/framedyn/alias_gcc.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/framedyn/alias_gcc.s b/dll/win32/framedyn/alias_gcc.s index b71d1baeaa4..6390c4c1387 100644 --- a/dll/win32/framedyn/alias_gcc.s +++ b/dll/win32/framedyn/alias_gcc.s @@ -1,6 +1,6 @@ #include <asm.inc> -.code64 +.code .align 4 MACRO(DEFINE_ALIAS, alias, alias2, origstring)
5 years, 5 months
1
0
0
0
[reactos] 11/21: [KERNEL32] Improve path name handling
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1b70ddd834ad81f7def62…
commit 1b70ddd834ad81f7def62c3166dd560de3d23361 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Apr 27 18:58:08 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [KERNEL32] Improve path name handling Fixes GCC 8 warning: dll/win32/kernel32/client/loader.c: In function 'LoadLibraryA': dll/win32/kernel32/client/loader.c:129:17: error: 'strncat' specified bound 13 equals source length [-Werror=stringop-overflow=] strncat(PathBuffer, "\\twain_32.dll", 13); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- dll/win32/kernel32/client/loader.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dll/win32/kernel32/client/loader.c b/dll/win32/kernel32/client/loader.c index 905f6ae7037..ec4111470a3 100644 --- a/dll/win32/kernel32/client/loader.c +++ b/dll/win32/kernel32/client/loader.c @@ -110,23 +110,25 @@ WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName) { + static const CHAR TwainDllName[] = "twain_32.dll"; LPSTR PathBuffer; UINT Len; HINSTANCE Result; /* Treat twain_32.dll in a special way (what a surprise...) */ - if (lpLibFileName && !_strcmpi(lpLibFileName, "twain_32.dll")) + if (lpLibFileName && !_strcmpi(lpLibFileName, TwainDllName)) { /* Allocate space for the buffer */ - PathBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, MAX_PATH); + PathBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, MAX_PATH + sizeof(ANSI_NULL)); if (PathBuffer) { /* Get windows dir in this buffer */ - Len = GetWindowsDirectoryA(PathBuffer, MAX_PATH - 13); /* 13 is sizeof of '\\twain_32.dll' */ - if (Len && Len < (MAX_PATH - 13)) + Len = GetWindowsDirectoryA(PathBuffer, MAX_PATH); + if ((Len != 0) && (Len < (MAX_PATH - sizeof(TwainDllName) - sizeof('\\')))) { /* We successfully got windows directory. Concatenate twain_32.dll to it */ - strncat(PathBuffer, "\\twain_32.dll", 13); + PathBuffer[Len] = '\\'; + strcpy(&PathBuffer[Len + 1], TwainDllName); /* And recursively call ourselves with a new string */ Result = LoadLibraryA(PathBuffer);
5 years, 5 months
1
0
0
0
[reactos] 10/21: [MSPAINT] Don't use SIZEOF on a pointer
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cdca4e903603a024d495b…
commit cdca4e903603a024d495bdc343a7f397aa7bd14f Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Apr 27 18:53:59 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [MSPAINT] Don't use SIZEOF on a pointer Fixes GCC 8 warning: base/applications/mspaint/definitions.h:16:31: error: division 'sizeof (LPWSTR {aka wchar_t*}) / sizeof (WCHAR {aka wchar_t})' does not compute the number of array elements [-Werror=sizeof-pointer-div] #define SIZEOF(a) (sizeof(a) / sizeof((a)[0])) ~~~~~~~~~~^~~~~~~~~~~~~~~~ base/applications/mspaint/main.cpp:134:55: note: in expansion of macro 'SIZEOF' lstrcpyn(pon->lpOFN->lpstrFile, Path, SIZEOF(pon->lpOFN->lpstrFile)); ^~~~~~ --- base/applications/mspaint/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/applications/mspaint/main.cpp b/base/applications/mspaint/main.cpp index 6b0d512cf4e..381b193158b 100644 --- a/base/applications/mspaint/main.cpp +++ b/base/applications/mspaint/main.cpp @@ -131,7 +131,7 @@ OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) *pch = 0; FileExtFromFilter(pch, pchTitle, pon->lpOFN); SendMessage(hParent, CDM_SETCONTROLTEXT, 0x047c, (LPARAM)pchTitle); - lstrcpyn(pon->lpOFN->lpstrFile, Path, SIZEOF(pon->lpOFN->lpstrFile)); + lstrcpyn(pon->lpOFN->lpstrFile, Path, pon->lpOFN->nMaxFile); } } break;
5 years, 5 months
1
0
0
0
[reactos] 09/21: [MSGINA] Fix copying the TokenSource string
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2800837dc0b6783d6c4fb…
commit 2800837dc0b6783d6c4fb61db2ce6e51199d3c47 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Apr 27 18:42:21 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [MSGINA] Fix copying the TokenSource string TOKEN_SOURCE::SourceString is an 8 char non-null-terminated string. Copy it as such. Fixes GCC 8 warning: dll/win32/msgina/lsa.c:195:5: error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation] strncpy(TokenSource.SourceName, "User32 ", sizeof(TokenSource.SourceName)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- dll/win32/msgina/lsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dll/win32/msgina/lsa.c b/dll/win32/msgina/lsa.c index 16eaf68fdd3..dca3cc0e1d8 100644 --- a/dll/win32/msgina/lsa.c +++ b/dll/win32/msgina/lsa.c @@ -48,6 +48,8 @@ ConnectToLsa( return Status; } +static const CHAR User32TokenSourceName[] = "User32 "; +C_ASSERT(sizeof(User32TokenSourceName) == RTL_FIELD_SIZE(TOKEN_SOURCE, SourceName) + 1); NTSTATUS MyLogonUser( @@ -192,7 +194,7 @@ MyLogonUser( SE_GROUP_ENABLED_BY_DEFAULT; /* Set the token source */ - strncpy(TokenSource.SourceName, "User32 ", sizeof(TokenSource.SourceName)); + RtlCopyMemory(TokenSource.SourceName, User32TokenSourceName, sizeof(TokenSource.SourceName)); AllocateLocallyUniqueId(&TokenSource.SourceIdentifier); Status = LsaLogonUser(LsaHandle,
5 years, 5 months
1
0
0
0
[reactos] 08/21: [ADVAPI32] Fix copying the TokenSource string
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3a9b524f102eb4c9f875…
commit f3a9b524f102eb4c9f8759d0c51990e354f488a2 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Apr 27 16:05:40 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [ADVAPI32] Fix copying the TokenSource string TOKEN_SOURCE::SourceString is an 8 char non-null-terminated string. Copy it as such. Fixes GCC 8 warning: dll/win32/advapi32/misc/logon.c:638:5: error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation] strncpy(TokenSource.SourceName, "Advapi ", sizeof(TokenSource.SourceName)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- dll/win32/advapi32/misc/logon.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dll/win32/advapi32/misc/logon.c b/dll/win32/advapi32/misc/logon.c index 742c0931785..1262f1b652d 100644 --- a/dll/win32/advapi32/misc/logon.c +++ b/dll/win32/advapi32/misc/logon.c @@ -11,6 +11,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi); /* GLOBALS *****************************************************************/ +static const CHAR AdvapiTokenSourceName[] = "Advapi "; +C_ASSERT(sizeof(AdvapiTokenSourceName) == RTL_FIELD_SIZE(TOKEN_SOURCE, SourceName) + 1); + HANDLE LsaHandle = NULL; ULONG AuthenticationPackage = 0; @@ -635,7 +638,9 @@ LogonUserExW( SE_GROUP_ENABLED_BY_DEFAULT; /* Set the token source */ - strncpy(TokenSource.SourceName, "Advapi ", sizeof(TokenSource.SourceName)); + RtlCopyMemory(TokenSource.SourceName, + AdvapiTokenSourceName, + sizeof(TokenSource.SourceName)); AllocateLocallyUniqueId(&TokenSource.SourceIdentifier); Status = LsaLogonUser(LsaHandle,
5 years, 5 months
1
0
0
0
[reactos] 07/21: [PSDK] Remove default value for BSTR parameter in msxml2.idl
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e825783b75ce833ec60ed…
commit e825783b75ce833ec60eded2068211d9285ab743 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Jun 3 09:14:21 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [PSDK] Remove default value for BSTR parameter in msxml2.idl Fixes GCC 8 warning: In file included from base/applications/msconfig_new/xmldomparser.hpp:26, from base/applications/msconfig_new/toolspage.cpp:11: sdk/include/psdk/msxml2.h:12705:20: error: ISO C++ forbids converting a string constant to 'BSTR' {aka 'wchar_t*'} [-Werror=write-strings] BSTR uri = L"x") = 0; ^~~~ --- sdk/include/psdk/msxml2.idl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/include/psdk/msxml2.idl b/sdk/include/psdk/msxml2.idl index 84555784f61..dc2a4a8a4b5 100644 --- a/sdk/include/psdk/msxml2.idl +++ b/sdk/include/psdk/msxml2.idl @@ -1258,7 +1258,7 @@ interface IXSLProcessor : IDispatch [id(DISPID_XMLDOM_PROCESSOR_SETSTARTMODE)] HRESULT setStartMode( [in] BSTR p, - [in, defaultvalue(L"")] BSTR uri); + [in] BSTR uri); [propget, id(DISPID_XMLDOM_PROCESSOR_STARTMODE)] HRESULT startMode([retval, out] BSTR *p); @@ -1286,7 +1286,11 @@ interface IXSLProcessor : IDispatch HRESULT addParameter( [in] BSTR p, [in] VARIANT var, +#ifndef __REACTOS__ [in, defaultvalue(L"")] BSTR uri); +#else + [in] BSTR uri); +#endif [id(DISPID_XMLDOM_PROCESSOR_ADDOBJECT)] HRESULT addObject(
5 years, 5 months
1
0
0
0
[reactos] 06/21: [PSDK][CRT] Add some casts to make GCC 8 happy
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48f3efa2544c33764278b…
commit 48f3efa2544c33764278bc0c72c3d4d8671fa84c Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Jun 3 09:07:36 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [PSDK][CRT] Add some casts to make GCC 8 happy --- sdk/include/crt/comutil.h | 4 ++-- sdk/lib/atl/atlsimpcoll.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/include/crt/comutil.h b/sdk/include/crt/comutil.h index 036428fab98..a929d977840 100644 --- a/sdk/include/crt/comutil.h +++ b/sdk/include/crt/comutil.h @@ -485,7 +485,7 @@ inline _variant_t::_variant_t(VARIANT &varSrc,bool fCopy) { ::VariantInit(this); _com_util::CheckError(::VariantCopy(this,&varSrc)); } else { - _COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc)); + _COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc)); V_VT(&varSrc) = VT_EMPTY; } } @@ -1149,7 +1149,7 @@ inline void _variant_t::Attach(VARIANT &varSrc) Clear(); - _COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc)); + _COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc)); V_VT(&varSrc) = VT_EMPTY; } diff --git a/sdk/lib/atl/atlsimpcoll.h b/sdk/lib/atl/atlsimpcoll.h index 3bf39c8e91c..a174378fa17 100644 --- a/sdk/lib/atl/atlsimpcoll.h +++ b/sdk/lib/atl/atlsimpcoll.h @@ -62,7 +62,7 @@ public: { // allocate extra capacity for optimization const int nNewCapacity = (m_nCount + 1) + c_nGrow; - T *pNewData = (T *)realloc(m_pData, nNewCapacity * sizeof(T)); + T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCapacity * sizeof(T)); if (pNewData == NULL) return FALSE; // failure @@ -141,7 +141,7 @@ public: // move range [nIndex + 1, m_nCount) to nIndex const int nRightCount = m_nCount - (nIndex + 1); const int nRightSize = nRightCount * sizeof(T); - memmove(&m_pData[nIndex], &m_pData[nIndex + 1], nRightSize); + memmove(static_cast<void *>(&m_pData[nIndex]), &m_pData[nIndex + 1], nRightSize); // decrement --m_nCount; @@ -184,7 +184,7 @@ public: int nNewCount = src.GetSize(); - T *pNewData = (T *)realloc(m_pData, nNewCount * sizeof(T)); + T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCount * sizeof(T)); ATLASSERT(pNewData); if (pNewData == NULL) return *this; // failure
5 years, 5 months
1
0
0
0
[reactos] 05/21: [PSDK] Add DECLSPEC_SELECTANY to GUIDs to make GCC 8 happy
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=846cd55294c1192b191a2…
commit 846cd55294c1192b191a21b16bc9a36360cd92e1 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Apr 27 22:16:49 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [PSDK] Add DECLSPEC_SELECTANY to GUIDs to make GCC 8 happy --- sdk/include/psdk/guiddef.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/include/psdk/guiddef.h b/sdk/include/psdk/guiddef.h index 8e8b7c92e35..143546270f2 100644 --- a/sdk/include/psdk/guiddef.h +++ b/sdk/include/psdk/guiddef.h @@ -61,8 +61,13 @@ typedef struct _GUID { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } #endif #else +#if __GNUC__ >= 8 +#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + EXTERN_C const GUID DECLSPEC_SELECTANY name +#else #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ EXTERN_C const GUID name +#endif // __GNUC__ >= 7 #endif #define DEFINE_OLEGUID(name, l, w1, w2) \
5 years, 5 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
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