mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added dwrite-layout-check patchset
This commit is contained in:
parent
e1fb783018
commit
b6649197d6
@ -0,0 +1,26 @@
|
||||
From 1b821d7a8398741a164800039535aaad396c299e Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
Date: Tue, 31 Jul 2018 08:35:01 +0300
|
||||
Subject: [PATCH] dwrite: Avoid possible out-of-bounds cluster metrics access.
|
||||
|
||||
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
---
|
||||
dlls/dwrite/layout.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 306c1178d4..903e7e8978 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -2089,7 +2089,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
|
||||
*/
|
||||
if (layout->len == 0)
|
||||
hr = layout_set_dummy_line_metrics(layout, 0);
|
||||
- else if (layout->clustermetrics[layout->cluster_count - 1].isNewline)
|
||||
+ else if (layout->cluster_count && layout->clustermetrics[layout->cluster_count - 1].isNewline)
|
||||
hr = layout_set_dummy_line_metrics(layout, layout->len - 1);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
--
|
||||
2.18.0
|
||||
|
2
patches/dwrite-layout-check/definition
Normal file
2
patches/dwrite-layout-check/definition
Normal file
@ -0,0 +1,2 @@
|
||||
Fixes: [45535] - dwrite Correct out of access
|
||||
|
@ -144,6 +144,7 @@ patch_enable_all ()
|
||||
enable_dsound_EAX="$1"
|
||||
enable_dsound_Fast_Mixer="$1"
|
||||
enable_dsound_Revert_Cleanup="$1"
|
||||
enable_dwrite_layout_check="$1"
|
||||
enable_dxdiagn_Enumerate_DirectSound="$1"
|
||||
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1"
|
||||
enable_dxgi_GammaRamp="$1"
|
||||
@ -609,6 +610,9 @@ patch_enable ()
|
||||
dsound-Revert_Cleanup)
|
||||
enable_dsound_Revert_Cleanup="$2"
|
||||
;;
|
||||
dwrite-layout-check)
|
||||
enable_dwrite_layout_check="$2"
|
||||
;;
|
||||
dxdiagn-Enumerate_DirectSound)
|
||||
enable_dxdiagn_Enumerate_DirectSound="$2"
|
||||
;;
|
||||
@ -3247,7 +3251,7 @@ fi
|
||||
if test "$enable_wined3d_DXTn" -eq 1; then
|
||||
patch_apply wined3d-DXTn/0001-wined3d-add-DXTn-support.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Kyle Devir", "wined3d: Add DXTn support.", 1 },';
|
||||
printf '%s\n' '+ { "Christian Costa", "wined3d: Add DXTn support.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -3273,7 +3277,7 @@ fi
|
||||
if test "$enable_d3dx9_36_DXTn" -eq 1; then
|
||||
patch_apply d3dx9_36-DXTn/0001-d3dx9_36-Add-dxtn-support.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Kyle Devir", "d3dx9_36: Add DXTn support.", 1 },';
|
||||
printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Add DXTn support.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -3658,6 +3662,21 @@ if test "$enable_dsound_EAX" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset dwrite-layout-check
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#45535] - dwrite Correct out of access
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dwrite/layout.c
|
||||
# |
|
||||
if test "$enable_dwrite_layout_check" -eq 1; then
|
||||
patch_apply dwrite-layout-check/0001-dwrite-Avoid-possible-out-of-bounds-cluster-metrics-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Nikolay Sivov", "dwrite: Avoid possible out-of-bounds cluster metrics access.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset dxdiagn-Enumerate_DirectSound
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user