Commit Graph

3483 Commits

Author SHA1 Message Date
Timo Kreuzer
daeb0bb257 [FTP] Fix invalid call to free()
While our glob is a dummy anyway and always returns NULL, the basic idea is that glob returns a NULL terminated array of pointers. The original code only calls blkfree to free any allocation in the array after the first one and doesn't free the array itself. Our code tried to be "smart" and free the array as well, but the array pointer was already changed by a "globbed++", resulting in trying to free an invalid address. Also the free was only called, when glob returned more than one result. This is now fixed by removing the "++", doing the blkfree on "&globbed[1]" and calling free on the originally returned array in all cases.

Fixes GCC 13 warning:

C:/ReactOS/reactos/base/applications/network/ftp/cmds.c: In function 'globulize':
C:/ReactOS/reactos/base/applications/network/ftp/cmds.c:1684:25: error: 'free' called on pointer 'globbed' with nonzero offset 4 [-Werror=free-nonheap-object]
 1684 |                         free((char *)globbed);
      |                         ^~~~~~~~~~~~~~~~~~~~~
C:/ReactOS/reactos/base/applications/network/ftp/cmds.c:1669:19: note: returned from 'glob'
 1669 |         globbed = glob(*cpp);
      |                   ^~~~~~~~~~

In our port glob is a dummy that always returns NULL, and the original code does not have a free here, either.
2026-03-18 17:29:12 +02:00
Timo Kreuzer
1c64719677 [CMD] Fix GCC 13 misleading-indentation warning
C:/ReactOS/reactos/base/shell/cmd/del.c: In function 'ProcessDirectory':
C:/ReactOS/reactos/base/shell/cmd/del.c:333:17: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
  333 |                 if (!(f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
      |                 ^~
In file included from C:/ReactOS/reactos/base/shell/cmd/precomp.h:14,
                 from C:/ReactOS/reactos/base/shell/cmd/del.c:48:
C:/ReactOS/reactos/sdk/include/crt/tchar.h:246:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  246 | #define _tcscpy wcscpy
      |                 ^~~~~~
C:/ReactOS/reactos/base/shell/cmd/del.c:338:21: note: in expansion of macro '_tcscpy'
  338 |                     _tcscpy(pFilePart, f.cFileName);
      |                     ^~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
3413675193 [CMD] Clear global pointer to local variable after use
GCC 13 doesn't like if you keep a dangling pointer around.

C:/ReactOS/reactos/base/shell/cmd/for.c: In function 'ForF':
C:/ReactOS/reactos/base/shell/cmd/for.c:307:20: error: storing the address of local variable 'Variables' in '*fc.values' [-Werror=dangling-pointer=]
  307 |         fc->values = Variables;
      |         ~~~~~~~~~~~^~~~~~~~~~~
C:/ReactOS/reactos/base/shell/cmd/for.c:141:12: note: 'Variables' declared here
  141 |     LPTSTR Variables[32];
      |            ^~~~~~~~~
C:/ReactOS/reactos/base/shell/cmd/for.c:57:14: note: 'fc' declared here
   57 | PFOR_CONTEXT fc = NULL;
      |              ^~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
f2b85d2a79 [CMD] Fix GCC 13 use-after-free warning
Make the code simpler, so GCC doesn't get confused.

C:/ReactOS/reactos/base/shell/cmd/misc.c: In function 'add_entry':
C:/ReactOS/reactos/base/shell/cmd/misc.c:216:14: error: pointer 'oldarg' may be used after 'realloc' [-Werror=use-after-free]
  216 |         *arg = oldarg;
      |         ~~~~~^~~~~~~~
In file included from C:/ReactOS/reactos/base/shell/cmd/cmd.h:29,
                 from C:/ReactOS/reactos/base/shell/cmd/precomp.h:34,
                 from C:/ReactOS/reactos/base/shell/cmd/misc.c:35:
C:/ReactOS/reactos/base/shell/cmd/cmddbg.h:30:31: note: call to 'realloc' here
   30 | #define cmd_realloc(ptr,size) realloc(ptr, size)
      |                               ^~~~~~~~~~~~~~~~~~
C:/ReactOS/reactos/base/shell/cmd/misc.c:212:12: note: in expansion of macro 'cmd_realloc'
  212 |     *arg = cmd_realloc (oldarg, (*ac + 2) * sizeof (LPTSTR));
      |            ^~~~~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
504ec9a619 [NSLOOKUP] Fix GCC 13 stringop-truncation warning
Don't strncpy 0 bytes. Also add an assert that source and dest are not the same.

C:/ReactOS/reactos/base/applications/network/nslookup/utility.c: In function 'ReverseIP':
C:/ReactOS/reactos/base/applications/network/nslookup/utility.c:264:5: error: 'strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
  264 |     strncpy( &pReturn[k], &pIP[i + 1], (j - i) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
af417da2f7 [MSPAINT] Don't use ZeroMemory on a non-POD object
Instead give IMAGE_PART a complete default contructor. Fixes GCC 13 warning.

In file included from C:/ReactOS/reactos/sdk/include/psdk/minwindef.h:171,
                 from C:/ReactOS/reactos/sdk/include/psdk/windef.h:17,
                 from C:/ReactOS/reactos/base/applications/mspaint/precomp.h:17,
                 from C:/ReactOS/reactos/base/applications/mspaint/history.cpp:9:
C:/ReactOS/reactos/base/applications/mspaint/history.cpp: In constructor 'ImageModel::ImageModel()':
C:/ReactOS/build-gcc-x86/sdk/include/psdk/winnt.h:8732:47: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct IMAGE_PART'; use assignment or value-initialization instead [-Werror=class-memaccess]
 8732 | #define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length))
      |                                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
C:/ReactOS/build-gcc-x86/sdk/include/psdk/winnt.h:8733:36: note: in expansion of macro 'RtlFillMemory'
 8733 | #define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0)
      |                                    ^~~~~~~~~~~~~
C:/ReactOS/reactos/sdk/include/psdk/minwinbase.h:31:20: note: in expansion of macro 'RtlZeroMemory'
   31 | #define ZeroMemory RtlZeroMemory
      |                    ^~~~~~~~~~~~~
C:/ReactOS/reactos/base/applications/mspaint/history.cpp:41:5: note: in expansion of macro 'ZeroMemory'
   41 |     ZeroMemory(m_historyItems, sizeof(m_historyItems));
      |     ^~~~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
5d6987462d [DHCPCSVC] Fix GCC 13 stringop-overflow warning
C:/ReactOS/reactos/base/services/dhcpcsvc/dhcp/adapter.c: In function 'AdapterDiscoveryThread':
C:/ReactOS/reactos/base/services/dhcpcsvc/dhcp/adapter.c:326:28: error: 'AdapterFindByHardwareAddress' accessing 16 bytes in a region of size 8 [-Werror=stringop-overflow=]
  326 |             if ((Adapter = AdapterFindByHardwareAddress(Table->table[i].bPhysAddr, Table->table[i].dwPhysAddrLen)))
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/ReactOS/reactos/base/services/dhcpcsvc/dhcp/adapter.c:326:28: note: referencing argument 1 of type 'u_int8_t[16]' {aka 'unsigned char[16]'}
C:/ReactOS/reactos/base/services/dhcpcsvc/dhcp/adapter.c:544:15: note: in a call to function 'AdapterFindByHardwareAddress'
  544 | PDHCP_ADAPTER AdapterFindByHardwareAddress( u_int8_t haddr[16], u_int8_t hlen ) {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-03-18 17:29:12 +02:00
Václav Zouzalík
0f021bf73a [PING] Update Czech (cs-CZ) translation (#8729) 2026-03-17 17:32:12 +01:00
Stefan Schramm
b3ff1ff98f [RAPPS] Fix loading of default settings (#8715)
Fixes a bug that causes the duplication of items in the general settings list when clicking the "Default" button.
2026-03-17 10:13:49 -05:00
Václav Zouzalík
9a652291cb [HOSTNAME] Add Slovak (sk-SK) translation (#8740) 2026-03-16 18:49:58 +01:00
Eric Kohl
16de117a01 [DHCPCSVC] Add required winnls.h 2026-03-09 00:03:04 +01:00
Eric Kohl
1f8f73d3b2 [DHCPCSVC] DhcpHandlePnPEvent: Set the binary class id
Also add a bit of documentation
2026-03-08 23:04:22 +01:00
Whindmar Saksit
f9b3aad55e [RAPPS] Don't display duplicate uninstall entries when WoW64 keys are unsupported (#8253)
This only happens on 64-bit because 32-bit was being conservative.
2026-03-08 19:00:39 +01:00
Eric Kohl
3f9f0e2a96 [PSDK][DHCSCSVC][IPCONFIG] Add DhcpHandlePnpEvent stub and use it in ipconfig
Ipconfig uses DhcpHandlePnpEvent to notify the dhcp client of a changed class id.
2026-03-08 12:22:47 +01:00
Mikhail Tyukin
20312ce0b1 [RPCSS] Sync to wine-10.0 2026-03-01 10:38:42 +02:00
Katayama Hirofumi MZ
c33672648f [CONIME] Follow-up of #8678 (#8692)
Follow-up of #8678.
JIRA issue: CORE-20243
- Rename conime_res.rc as conime.rc.
- Rename Icon_2.ico as conime.ico.
2026-03-01 10:21:35 +09:00
Katayama Hirofumi MZ
80bd460836 [SDK][KBSWITCH][CONIME][IMM32][NTUSER][MSCTFIME][MSUTB] Define LANGID_... (#8691)
Follow-up of #8678. Commonize the definition of
LANGID_... values.
JIRA issue: CORE-20243
- Define LANGID_... values for CJK in <cjkcode.h> and
  use it.
2026-02-27 10:02:23 +09:00
Katayama Hirofumi MZ
423d7031fe [CONIME][BOOTDATA][GITHUB][SDK] Add conime.exe (#8678)
Prepare for Console IME Input for East Asian.
JIRA issue: CORE-20243
- Modify .github/labeler.yml.
- Add base/system/conime/ .
- Modify boot/bootdata/hivesft.inf for Console
  settings.
- Add imm32!ImmCallImeConsoleIME prototype
  into <imm32_undoc.h>.
- Add IMS_CONSOLEIME_1A and IMS_CONSOLEIME_1B
  values into <imm32_undoc.h>, for WM_IME_SYSTEM
  message.
2026-02-26 09:28:22 +09:00
Mark Jansen
3529151141 [MSCUTILS] Add very basic certmgr 2026-02-15 20:13:01 +01:00
Piotr Hetnarowicz
17a337fbfa [SERVMAN] Update Polish (pl-PL) translation (#8191)
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
2026-02-15 18:05:29 +01:00
Jakub Kretkowski
7b426bc8b6 [APPLICATIONS] Improve and fix Polish (pl-PL) translation (#8030)
Update translations for:
- EVENTVWR, MSPAINT, NOTEPAD, RAPPS, REGEDIT, TASKMGR;
- IPCONFIG, TRACERT, WLANCONF.

CORE-20207

Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-02-15 17:51:15 +01:00
Eric Kohl
d144fe350a [DISKPART] Refactor the GPT partition creation code
- Move common partition creation code to a separate function.
2026-02-15 16:26:08 +01:00
Ivan Ivo
514506d8f5 [CHARMAP][MSPAINT][WELCOME] Add Croatian (hr-HR) translation (#8654)
All strings have been translated and reviewed for clarity, grammar,
and consistency with the existing Croatian translations used in ReactOS.
2026-02-14 13:00:34 +03:00
Chan Chilung
9ef0557de5 [KBSWITCH][CPL] Update Traditional Chinese (zh-TW) translation (#8621)
Update translation for KBSWITCH, and the following CPL applets:
DESK, HOTPLUG, INPUT, MMSYS, POWERCFG, SYSDM.
2026-02-13 22:41:09 +01:00
Sumon Kayal
c1879360e8 [CHARMAP] Add Indian Bengali (bn-IN) translation (#8556) 2026-02-13 22:35:18 +01:00
Václav Zouzalík
17e2bdb6ab [CLIP] Add Czech (cs-CZ) and Slovak (sk-SK) translations (#8410) 2026-02-13 22:31:15 +01:00
Eric Kohl
b03c40f440 [DISKPART] Disable all unimplemented commands 2026-02-08 12:38:34 +01:00
Eric Kohl
44609d1398 [DISKPART] Ignore non-mounted GPT partitions in DismountVolume 2026-02-07 14:44:05 +01:00
Eric Kohl
ece92ee517 [DISKPART] Improve the PrintSize function
- Pass the output buffer size to the PrintSize function.
- Use StringCchPrintfW instead of swprintf.
2026-02-07 12:24:22 +01:00
Eric Kohl
b2c1dd83d5 [DISKPART] Fix the drive letter deletion code
The remove and assign commands work properly now.
2026-02-02 22:11:05 +01:00
Eric Kohl
5fd860b383 [DISKPART] Print proper success message in the assign command 2026-02-01 23:53:41 +01:00
Hermès Bélusca-Maïto
8c9039bbd4 [WINLOGON] Workaround buggy 3rd-party DLLs that use a wrong notification handler calling convention (#8640)
CORE-20279

PRELIMINARY REMARK: The described bug and code workaround only applies
for x86 32-bit builds.

----

While the Winlogon notification handlers[^1] actually use a `STDCALL`
calling convention, which can be trivially verified by debugging the
official Windows <= 2003 winlogon.exe and its notification extensions,
there exist 3rd-party Winlogon notification DLLs, like the `Ati2evxx.dll`
one from AMD/ATI XP video drivers, that use a `CDECL` calling convention,
or an invalid number (zero) of parameters.

I think the reason why this happens is as follows.
The official documentation[^1] indicates that the handlers have the
following prototype:
```c
void Event_Handler_Function_Name(
  _In_ PWLX_NOTIFICATION_INFO pInfo
);
```
The documentation (and possibly the internal header Windows is using for
Winlogon) is sloppy, because it doesn't tell whether the convention is
`STDCALL` or `CDECL`. When compiling routines with such a signature, the
compiler will employ whatever default convention it is set to use.

Windows code is typically compiled with `STDCALL` convention as the default
(see e.g. how the Windows Development Kit is set up), thus, such a
function signature would default to `STDCALL`. Observation (with debugger)
shows that it is what Windows' winlogon.exe is indeed expecting.

However, 3rd-party code using a different development environment, could
set the compiler to use `CDECL` as the default calling convention. As a
result, the function signature from above would use `CDECL` instead.

The difference between the `STDCALL` and `CDECL` conventions is how the
function parameters are passed on the stack and how the stack is cleaned
at the end (`STDCALL`: the function unwinds the stack; `CDECL`: the caller
does it). A calling convention mismatch would therefore corrupt the stack,
and this is exactly what happens with the `Ati2evxx.dll` from the AMD/ATI
drivers, see CORE-20279.

The ReactOS Winlogon crashes from the `_RTC_Failure()` handler just after
the 3rd-party handler returns, since we compile our code with runtime checks
enabled. Windows' winlogon.exe doesn't apparently crash, because neither
in Release nor in Checked/Debug mode did they compile winlogon.exe with
RTC enabled. However, its stack would become more corrupt with time.

In order to alleviate this in ReactOS' winlogon.exe, I decided to use
a "generic" workaround, manually calling the handler with inline ASM
(which is OK since the problem and solution is x86-specific only).
It does something similar to what the RTC support does: it checks the
stack pointer after the call and restores it if needed.
An informative message is then emitted in the debugger telling which DLL
is buggy and needs to be fixed.

[^1]: https://learn.microsoft.com/en-us/windows/win32/secauthn/event-handler-function-prototype
2026-01-29 21:04:44 +01:00
Hermès Bélusca-Maïto
9c0efba4b3 [USERINIT] Hide install option on LiveCD when no installer is available (#8614)
RELEASE-8
2026-01-22 21:48:32 +01:00
Hermès Bélusca-Maïto
d46372ef1a [USERINIT] Cleanup some traces and some code 2026-01-22 21:48:16 +01:00
Doug Lyons
7de9099e5d [REGEDIT] Fix import of ASCII file writing Unicode data (#8587)
Test text of ASCII file using "hex()" data for presence of Unicode and handle accordingly.

CORE-15185
2026-01-21 20:43:42 -06:00
Thomas Anderson
afc4f33b20 [IEXPLORE] Make the Internet Browser desktop icon use DuckDuckGo instead of Google (#8582)
Google recently made modern browser a requirement for their search to work,
which the Gecko engine for ReactOS doesn't fulfill.

Since ReactOS is already using DuckDuckGo as the default search engine,
set it as a default start page.

- Before: https://github.com/user-attachments/assets/c544726f-2d83-4a9a-9d53-e9c17fc04fe9
- After: https://github.com/user-attachments/assets/5de5b007-3d1f-458d-a642-6b9e657b4c62
2026-01-19 12:40:52 +03:00
Eric Kohl
e7de59ba45 [DISKPART] Add missing trailing CRLF 2026-01-18 09:12:12 +01:00
Eric Kohl
6da5483392 [DISKPART] Make size units translatable 2026-01-18 01:23:20 +01:00
Vitaly Orekhov
7c801c2c15 [SNDVOL32] Update master volume and mute on external events (#8580)
Tray popup window that shows master volume and mute was not updated in real
time if something outside it adjusted master volume or line mute. Now it does.

- Handle `MM_MIXM_CONTROL_CHANGE` window message in `sndvol32.exe!TrayDlgProc`

CORE-12632
2026-01-17 21:14:44 +03:00
Katayama Hirofumi MZ
3ba9d33b03 [MMC] Add Japanese (ja-JP) translation
CORE-18706
2026-01-17 19:37:45 +09:00
Katayama Hirofumi MZ
bda1fcb8ab [GAMES][WINMINE] Improve Japanese (ja-JP) translation
CORE-18706
2026-01-17 19:32:59 +09:00
Katayama Hirofumi MZ
b2836706cf [GAMES][SOL] Improve Japanese (ja-JP) translation
CORE-18706
2026-01-17 19:26:59 +09:00
Katayama Hirofumi MZ
d064e31634 [FLTMC] Add Japanese (ja-JP) translation
CORE-18706
2026-01-17 19:23:41 +09:00
Katayama Hirofumi MZ
5779ef5d5c [TASKMGR] Update Japanese (ja-JP) translation
CORE-18706
2026-01-17 19:13:17 +09:00
Chan Chilung
323a406fcf [BASE][CPL] Update Traditional Chinese (zh-TW) translation (#8581)
- [MSCONFIG] Update Traditional Chinese (zh-TW) translation
- [MSCONFIG_NEW] Update Traditional Chinese (zh-TW) translation
- [MSPAINT] Update Traditional Chinese (zh-TW) translation
- [NOTEPAD] Update Traditional Chinese (zh-TW) translation
- [RAPPS] Update Traditional Chinese (zh-TW) translation
- [SETUP:REACTOS] Update Traditional Chinese (zh-TW) translation
- [CPL:ACCESS] Update Traditional Chinese (zh-TW) translation
- [CPL:APPWIZ] Update Traditional Chinese (zh-TW) translation

Take into account documentation updates in b380d23d6f.
2026-01-15 18:28:54 +03:00
Katayama Hirofumi MZ
3319a16288 [REGEDIT] Fix column string sort (#8590)
JIRA issue: CORE-20434
Fix 3rd bug of CORE-20434.
- Sort the columns as strings when
  REG_SZ, REG_EXPAND_SZ, and
  REG_MULTI_SZ.
2026-01-14 20:59:31 +09:00
Eric Kohl
df01aa6241 [DISKPART] Replace the hardcoded volume type strings 2026-01-13 23:30:42 +01:00
Eric Kohl
b5097211c8 [DISKPART] Replace hardcoded strings and fix typos 2026-01-13 21:16:37 +01:00
Eric Kohl
702f9c6f77 [DISKPART] Prevent drive letter changes on boot or system volumes 2026-01-12 19:35:38 +01:00
Eric Kohl
a40bd103fc [DISKPART] Prevent deletion of boot and system partitions 2026-01-12 15:30:19 +01:00