mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patchset to fix various upstream issues detected by Coverity.
This commit is contained in:
parent
b942798ef9
commit
0432712e4e
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -20,6 +20,7 @@ wine-staging (1.7.44) UNRELEASED; urgency=low
|
||||
* Added patch to allow hiding wine version information from applications.
|
||||
* Added patch to fix scaling behaviour of images and mipmap levels in
|
||||
IDirect3DTexture2_Load.
|
||||
* Added patchset to fix various upstream issues detected by Coverity.
|
||||
* Removed patch to reset device state in SysKeyboard*Impl_Acquire (accepted
|
||||
upstream).
|
||||
* Removed patch to avoid creating thread queues for foreign threads in
|
||||
|
@ -0,0 +1,25 @@
|
||||
From eba72a3ed5d6f61c92ce2926d8305d19dc66425b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 17:08:18 +0200
|
||||
Subject: ws2_32: Fix uninitialized memory access in do_poll (Coverity).
|
||||
|
||||
---
|
||||
dlls/ws2_32/socket.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
|
||||
index fdf68a3..60c6ec5 100644
|
||||
--- a/dlls/ws2_32/socket.c
|
||||
+++ b/dlls/ws2_32/socket.c
|
||||
@@ -4794,7 +4794,7 @@ static int do_poll(struct pollfd *pollfds, int count, int timeout)
|
||||
struct timeval tv1, tv2;
|
||||
int ret, torig = timeout;
|
||||
|
||||
- if (timeout > 0) gettimeofday( &tv1, 0 );
|
||||
+ if (timeout >= 0) gettimeofday( &tv1, 0 );
|
||||
|
||||
while ((ret = poll( pollfds, count, timeout )) < 0)
|
||||
{
|
||||
--
|
||||
2.4.2
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 173d42087f21dae75c8fb7299f5444c3d57a35c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 May 2015 15:30:36 +0200
|
||||
Subject: amstream: Correctly check return values in
|
||||
IAMMultiMediaStreamImpl_Initialize (Coverity).
|
||||
|
||||
---
|
||||
dlls/amstream/amstream.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c
|
||||
index 800e48d..fcef7ec 100644
|
||||
--- a/dlls/amstream/amstream.c
|
||||
+++ b/dlls/amstream/amstream.c
|
||||
@@ -256,11 +256,11 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if
|
||||
This->StreamType = StreamType;
|
||||
hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking, (void**)&This->media_seeking);
|
||||
if (SUCCEEDED(hr))
|
||||
- IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control);
|
||||
+ hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter);
|
||||
if (SUCCEEDED(hr))
|
||||
- IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW);
|
||||
+ hr = IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
IMediaEventEx* media_event = NULL;
|
||||
--
|
||||
2.4.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 6addc4f5304995f32525dce5422bc6544d7b313d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 May 2015 15:36:43 +0200
|
||||
Subject: kernel32: Correctly check for an empty short filename in
|
||||
GetShortPathNameW (Coverity).
|
||||
|
||||
---
|
||||
dlls/kernel32/path.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index f74b952..09b8b7f 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -528,7 +528,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
|
||||
|
||||
/* In rare cases (like "a.abcd") short path may be longer than original path.
|
||||
* Make sure we have enough space in temp buffer. */
|
||||
- if (wfd.cAlternateFileName && tmplen < strlenW(wfd.cAlternateFileName))
|
||||
+ if (wfd.cAlternateFileName[0] && tmplen < strlenW(wfd.cAlternateFileName))
|
||||
{
|
||||
WCHAR *new_buf;
|
||||
buf_len += strlenW(wfd.cAlternateFileName) - tmplen;
|
||||
--
|
||||
2.4.2
|
||||
|
@ -76,6 +76,7 @@ warning()
|
||||
patch_enable_all ()
|
||||
{
|
||||
enable_Compiler_Warnings="$1"
|
||||
enable_Coverity="$1"
|
||||
enable_Exagear="$1"
|
||||
enable_Pipelight="$1"
|
||||
enable_Staging="$1"
|
||||
@ -296,6 +297,9 @@ patch_enable ()
|
||||
Compiler_Warnings)
|
||||
enable_Compiler_Warnings="$2"
|
||||
;;
|
||||
Coverity)
|
||||
enable_Coverity="$2"
|
||||
;;
|
||||
Exagear)
|
||||
enable_Exagear="$2"
|
||||
;;
|
||||
@ -1806,13 +1810,6 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
|
||||
enable_ntdll_FileDispositionInformation=1
|
||||
fi
|
||||
|
||||
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
|
||||
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
|
||||
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
|
||||
fi
|
||||
enable_kernel32_SetFileCompletionNotificationMode=1
|
||||
fi
|
||||
|
||||
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
|
||||
if test "$enable_server_File_Permissions" -gt 1; then
|
||||
abort "Patchset server-File_Permissions disabled, but ntdll-FileDispositionInformation depends on that."
|
||||
@ -1820,6 +1817,13 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
|
||||
enable_server_File_Permissions=1
|
||||
fi
|
||||
|
||||
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
|
||||
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
|
||||
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
|
||||
fi
|
||||
enable_kernel32_SetFileCompletionNotificationMode=1
|
||||
fi
|
||||
|
||||
if test "$enable_dxva2_Video_Decoder" -eq 1; then
|
||||
if test "$enable_winecfg_Staging" -gt 1; then
|
||||
abort "Patchset winecfg-Staging disabled, but dxva2-Video_Decoder depends on that."
|
||||
@ -1908,6 +1912,22 @@ if test "$enable_Compiler_Warnings" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset Coverity
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/amstream/amstream.c, dlls/kernel32/path.c, dlls/ws2_32/socket.c
|
||||
# |
|
||||
if test "$enable_Coverity" -eq 1; then
|
||||
patch_apply Coverity/0001-ws2_32-Fix-uninitialized-memory-access-in-do_poll-Co.patch
|
||||
patch_apply Coverity/0002-amstream-Correctly-check-return-values-in-IAMMultiMe.patch
|
||||
patch_apply Coverity/0003-kernel32-Correctly-check-for-an-empty-short-filename.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "ws2_32: Fix uninitialized memory access in do_poll (Coverity).", 1 },';
|
||||
echo '+ { "Michael Müller", "amstream: Correctly check return values in IAMMultiMediaStreamImpl_Initialize (Coverity).", 1 },';
|
||||
echo '+ { "Michael Müller", "kernel32: Correctly check for an empty short filename in GetShortPathNameW (Coverity).", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ws2_32-WriteWatches
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2931,6 +2951,36 @@ if test "$enable_kernel32_CompareStringEx" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-SetFileCompletionNotificationMode
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
|
||||
# | dlls/kernel32/kernel32.spec, include/winbase.h
|
||||
# |
|
||||
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
|
||||
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
|
||||
(
|
||||
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-SetFileInformationByHandle
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/file.c, include/winbase.h
|
||||
# |
|
||||
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
|
||||
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
|
||||
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
|
||||
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-File_Permissions
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2972,36 +3022,6 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-SetFileCompletionNotificationMode
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
|
||||
# | dlls/kernel32/kernel32.spec, include/winbase.h
|
||||
# |
|
||||
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
|
||||
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
|
||||
(
|
||||
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-SetFileInformationByHandle
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/file.c, include/winbase.h
|
||||
# |
|
||||
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
|
||||
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
|
||||
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
|
||||
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-CopyFileEx
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -4979,6 +4999,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/swapchain.c
|
||||
# |
|
||||
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5052,18 +5084,6 @@ if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/swapchain.c
|
||||
# |
|
||||
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
Reference in New Issue
Block a user