1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00
Commit graph

153344 commits

Author SHA1 Message Date
Michael Stefaniuc
229d05a854 Release 7.0.2.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-27 22:03:45 +02:00
Alexandre Julliard
a4916aa241 gitlab: Add workaround for more strict git ownership check.
(cherry picked from commit 7af84c79a1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Paul Gofman
7bd2197b60 winhttp/tests: Avoid race condition on closing connection in server_thread().
The connection may be cached and checked for availability for request
before the server thread closes it.

(cherry picked from commit f75a8b3555)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
David Curtiss
88c2d88df0 ws2_32: Allow getsockname after AcceptEx.
.NET 6's HTTP/Socket code queries this. Winsock allows getsockname
on the AcceptEx AcceptSocket, but only if SO_UPDATE_ACCEPT_CONTEXT
is set.

Signed-off-by: David Curtiss <david.curtiss@ni.com>
(cherry picked from commit 68d4643a67)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Rémi Bernon
4cf98d91cf server: Avoid using pointer value after realloc.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c57eda2432)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Eric Pouech
8799d50cc8 winedbg: Fix retrieving integral values.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
(cherry picked from commit 685126e857)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Zebediah Figura
b480fb8695 libwine: Avoid comparing the result of pointer arithmetic to zero.
gcc warns about this:

../wine/libs/wine/mmap.c: In function ‘wine_mmap_add_reserved_area_obsolete’:
../wine/libs/wine/mmap.c:504:9: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘(char *)addr + (sizetype)size’ must not be NULL [-Werror=address]
  504 |     if (!((char *)addr + size)) size--;  /* avoid wrap-around */
      |         ^

(cherry picked from commit d17fe0a792)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Piotr Caban
43b190c707 msvcrt: Fix _wputenv_s invalid argument handling.
(cherry picked from commit f943d44972)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Piotr Caban
e5c7a6685d msvcrt: Fix _putenv_s return value on error.
(cherry picked from commit 53acb6e736)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Piotr Caban
d4a998f795 msvcrt: Fix _wputenv_s return value on error.
(cherry picked from commit f0e6447b7f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Hugh McMaster
a40055a461 conhost: Set correct face name when the specified font is not available.
conhost.exe currently copies the user-specified face name from the
LOGFONT structure. This results in an invalid face name when the
specified font is not available.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 303f8042f9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Robert Wilhelm
7398ee371a scrrun: Avoid memory leak in error case.
(cherry picked from commit ccc001ee43)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
David Kahurani
f0d48a022b ieframe: Fix memory leak in open_dde_url.
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
(cherry picked from commit 6e32c011a2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Akihiro Sagawa
43688617bb mciqtz32: Fix thread handle leak if a second play.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
(cherry picked from commit de0794a1dd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Claire Girka
4ba4c3b058 winepulse: Fix memory leak in pulse_create_stream in some error cases.
(cherry picked from commit 32a6380825)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Alex Henrie
f87e48d6df user32: Plug icon handle leak in MDI_AugmentFrameMenu (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
(cherry picked from commit 001d78a582)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Zhiyi Zhang
d75cfe9749 win32u: Fix a memory leak.
The subkey handle is leaked when deleting a GPU entry succeeded. Also, there is no need
to restart the enumeration for the grandparent key hkey.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e55515bf5b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Torge Matthies
84692f4c91 msvcp90: Fix segfault in bad_alloc exception default constructor.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 00012d3381)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:03 +01:00
Kevin Puetz
484f3e0ea4 vbscript: Don't abort when trying to TRACE() functions with many arguments.
__wine_dbg_output accumulates the output characters in a debug_info
structure, flushing it when it encounters '\n'. If debug_info plus the
new string exceed 1024 characters, append_output will print

> wine_dbg_output: debugstr buffer overflow

and then crash the process via abort().

wine_dbgstr_variant limits the length printed for any individual argument,
but a function with multiple parameters can still plausibly exceed 1024.

Fixed by formatting the TRACE for each argument on a separate line,
as similar places (like oleaut32/typelib.c:dump_DispParms) do.

(cherry picked from commit 0fb2d0f04e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Alexandre Julliard
b30b5520a7 gdiplus: Get the compositing mode directly from the graphics object.
GdipGetCompositingMode() fails when the object is busy, which happens
when flushing changes in GdipReleaseDC().

Fixes a test crash on Gitlab CI.

(cherry picked from commit fe7df46118)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zebediah Figura
b17e54de41 msvcrt: Add SEH annotations for sse2_memcpy().
This allows unwinding from a crash inside the function.

(cherry picked from commit 5714042137)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
047d3f0544 win32u: Choose a smaller ppem to avoid exceeding the requested font height.
When height > 0, CreateFontA/W() should not return a font face exceeding the requested height.
For instance, Tahoma has 2049 units of ascent, 423 units of descent and its units per EM square is
2048. When requesting a font 20 pixels in height, ppem = units_per_EM * requested_height / (ascent + descent)
= 2048 * 20 / (2049 + 423) = 16.57 ~= 17. When getting the resulting height back from the ppem,
resulting_height = (ascent + descent) * ppem / units_per_EM = (2049.0 + 423) * 17 / 2048 = 20.52
~=21. So it ends up getting a larger font than requested and violates the spec.

Fix Nancy Drew: Legend of the Crystal Skull crash at start.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit 58b477d158)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
e743adebb1 gdi32/tests: Add more tests for GetTextMetrics().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit 821b36e00b)
Conflicts:
	dlls/gdi32/tests/font.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Alexandre Julliard
025172bdc9 mountmgr: Don't crash if connecting to dbus fails.
(cherry picked from commit 3110b72e12)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
b2c3fce40b winegstreamer: Always check the return value from mf_media_type_from_wg_format().
mf_media_type_from_wg_format() may return NULL.

Fix Airborne Kingdom crash at start because WG_AUDIO_FORMAT_UNKNOWN is passed to
mf_media_type_from_wg_format().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit 6f8990b431)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Tim Clem
67c81ef39e kernelbase: Don't assume the length of the process image name.
NtQueryInformationProcess(ProcessImageFileNameWin32) may return an
empty string in some circumstances, which leads
QueryFullProcessImageNameW to crash if called with flags including
PROCESS_NAME_NATIVE, as that path assumed the image name had a length
of at least 2.

(cherry picked from commit a7937e83b2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Santino Mazza
e854d91eed jscript: Return ParseProcedureText when compile fails.
This prevents crashes when there is an invalid script
inside a tag property.

Because ParseProcedureText calls release_bytecode without
checking if compile_script failed, "code" is not set, and
this leads to a crash when release_bytecode tries to access it.

Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
(cherry picked from commit d93712feee)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
ff738dec33 winex11.drv: Don't compare error event serial if it's zero.
Sometimes error event serial is zero. For example, NVIDIA driver may send X_GLXCopyContext errors
with the event serial set to zero. When it's zero, previously the error handler passes the error
to the default error handler and cause application crashes.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit d328af75fe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
bd7f5699b1 winex11.drv: Handle X errors from glXCopyContext().
glxCopyContext() may throw X errors and cause the current process to exit. For example, Mesa doesn't
support glxCopyContext() for direct rendering contexts and ends up using the code path for indirect
rendering contexts. When Xorg receives such requests, it rejects them because they're for direct
rendering contexts and reports an X error. We also can't use indirect rendering context because
it needs to be explicitly enabled in xorg.conf and has poor performance. So handle this error before
graphics drivers implement the support.

Fix Cladun X2 crash at start.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit ed546bf190)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Daniel Lehman
66484ed229 kernelbase: Pass va_list copy to internal RtlFormatMessage.
va_list passed to RtlFormatMessage is modified even on error in this
case, if the buffer is not large enough, STATUS_BUFFER_OVERFLOW is
returned and FormatMessage tries again, but the va_list pointer is now
moved to a later argument, so the next call reads off the end,
crashing.

Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1714963a5f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zebediah Figura
4c6c5137da ntdll: Calculate the necessary length after calling snprintf() in SystemWineVersionInformation.
This works around a spurious gcc warning:

../wine/dlls/ntdll/unix/system.c: In function ‘NtQuerySystemInformation’:
../wine/dlls/ntdll/unix/system.c:3176:36: error: ‘%s’ directive output between 0 and 2147483644 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-truncation=]
 3176 |         snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release );
      |                                    ^~                       ~~~~~~~~~~
../wine/dlls/ntdll/unix/system.c:3176:9: note: ‘snprintf’ output between 8 and 2147483780 bytes into a destination of size 4294967295
 3176 |         snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(cherry picked from commit f66b49a496)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Jeff Smith
74b66e5919 d3drm: Fix components of palette built when loading texture from file.
Fix the palette-building code used by IDirect3DTexture::InitFromFile
to use color components correctly. Also, fix and expand the tests to
properly check the components of a built palette.

(cherry picked from commit 293c6d24e3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Jeff Smith
cb0d3f8197 d3drm/tests: Clean up some magic values.
In BMP files with 24-bit depth, color components are stored in BGR
order. Due to magic values being used several places in tests to reduce
the components, some logical errors are hard to spot.

Give names to the magic values to make logical errors more apparent.

(cherry picked from commit 77189a341f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Martin Storsjö
65c0eacdee ntdll: Add SEH unwind info in ARM assembly functions/trampolines.
Clang generates SEH unwind info on ARM in both MSVC and mingw mode
since Clang 15. The unwind info gets which gets enabled automatically
by building with a new enough compiler.

For functions/trampolines that are implemented in assembly, the unwind
information needs to be provided by hand - in particular for cases
where unwinding should be diverted.

Contrary to AArch64, Clang got SEH assembler directives directly from
the start when SEH was implemented (when the __SEH__ compiler define
gets set), so there's no need for compiler version checks (like for
AArch64 in include/wine/asm.h), but the default check for __SEH__
works fine for enabling the __ARM_SEH() macro.

Use a custom unwind opcode in the private opcode space for unwinding
to a specific CONTEXT instead of up to the caller. (Contrary to
AArch64, there's no specific unwind opcode for restoring a full
CONTEXT, but the unwind opcode space does have a couple
unallocated values marked as "available", which can be used
for vendor specific needs here.)

This fixes unwinding in ARM PE builds.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2d43653a2e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zebediah Figura
7628323164 xslt: Use win32config.h from the correct directory.
This also fixes the build with external libxml2 but bundled libxslt.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c111332d1b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Martin Storsjö
7ad7d8a2c9 include: Add declarations of _alloca and alloca for MSVC mode.
This fixes builds with recent Clang 15 (which still is in development),
which errors out on implicit declarations.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8f8b802e12)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Alexandre Julliard
7db96e3a59 urlmon/tests: Fix race condition in abort test.
The result can arrive before we have time to abort.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53268
(cherry picked from commit 44a81794df)
Conflicts:
	dlls/urlmon/tests/protocol.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Hans Leidekker
a58b3b63fa wbemprox: WQL string comparisons are case insensitive.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53832
(cherry picked from commit 7bfa058a0b)
Conflicts:
	dlls/wbemprox/tests/query.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Mihail Ivanchev
7ef77024d2 include: Add prototype for ReOpenFile().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53821
(cherry picked from commit 10e7c824e0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Alistair Leslie-Hughes
2d871a6b1d crypt32: Only report Unimplemented decoder when not found in external dll.
Some applications spam this fixme.
fixme:cryptasn:CRYPT_GetBuiltinDecoder Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4

This OID is supported in wintrust.dll which crypt32 uses, so this console fixme doesn't make sense.
The fixme will only appear if no support for the requested decoder is available.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53800
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
(cherry picked from commit 42bd5ea4c4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Alexandre Julliard
ba4a879388 shell32: Don't return an uninitialized pointer on error in enum_trash_items().
(cherry picked from commit 33c56be5ae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Dmitry Timoshkov
4551a6a3c7 sechost: Support decimal or octal access rights in ConvertStringSecurityDescriptorToSecurityDescriptor.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f2583de38d)
Conflicts:
	dlls/advapi32/tests/security.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
9b7d51640b comctl32/edit: Don't repaint immediately when getting focus.
Fix MSXML 3.0 installer username edit control missing part of its edge. The application has a static
control overlapping an edit control. Repainting the edit control immediately will cause the edit
control to be painted under the static control.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit a336b43a93)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Zhiyi Zhang
e83b7ecf8b comctl32/tests: Test that changing focus for edit controls doesn't repaint immediately.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
(cherry picked from commit 2a27ffe423)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:39:02 +01:00
Sebastian Lackner
a014425744 ntdll: Improve stub of NtQueryEaFile.
Co-authored-by: Qian Hong <qhong@codeweavers.com>
Co-authored-by: Joel Holdsworth <joel@airwebreathe.org.uk>
Signed-off-by: Joel Holdsworth <joel@airwebreathe.org.uk>
(cherry picked from commit 3c4cdfa704)
Conflicts:
	dlls/ntdll/tests/file.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00
Alistair Leslie-Hughes
87ce92d1a7 odbc: SQLGetInfoW allow NULL parameter InfoValue.
MSDN states, a NULL InfoValue parameter will return as the length.
unixODBC which we currently use, handles this scenario.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53714
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
(cherry picked from commit e8b7c1da6c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00
David Kahurani
9e9152843b win32u: Use allocator mechanism to allocate DC attributes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53645
(cherry picked from commit 903c91fc60)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00
Huw Davies
24c5f4f147 nsi: Use the correct members for the error and discard counts.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53234
(cherry picked from commit 673da9cdec)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00
Zebediah Figura
bdc1b882cb ntdll: Add a fast path for NtDeviceIoControlFile(INVALID_HANDLE_VALUE).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53706
(cherry picked from commit d0f34c232a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00
Gijs Vermeulen
cd81246369 msvcp140: Add _ExceptionHolder::ReportUnhandledError stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53614
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
(cherry picked from commit 3f47b478b4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2023-03-24 11:37:42 +01:00