Skip to content

Commit 01dce08

Browse files
[release/10.0] Source code updates from dotnet/dotnet (#12050)
* Backflow from https://github.com/dotnet/dotnet / b501678 build 338287 Diff: https://github.com/dotnet/dotnet/compare/bdc67940ff35bd800920c0d0cfa65b174af97083..b50167817409d70b2d1926ca0a48247c223b32b0 From: dotnet/dotnet@bdc6794 To: dotnet/dotnet@b501678 [[ commit created by automation ]] * Update dependencies from build 338287 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.Helix.Sdk (Version 10.0.0-beta.26513.124 -> 10.0.0-beta.26525.101) Microsoft.Dotnet.WinForms.ProjectTemplates, Microsoft.NETCore.Platforms, Microsoft.Private.Winforms, System.Private.Windows.Core.TestUtilities (Version 10.0.14-servicing.26513.124 -> 10.0.15-servicing.26525.101) Microsoft.NETCore.App.Ref, System.CodeDom, System.Configuration.ConfigurationManager, System.Diagnostics.EventLog, System.DirectoryServices, System.Drawing.Common, System.Formats.Nrbf, System.IO.Packaging, System.Reflection.MetadataLoadContext, System.Resources.Extensions, System.Runtime.Serialization.Formatters, System.Security.Cryptography.Xml, System.Security.Permissions, System.Windows.Extensions (Version 10.0.14 -> 10.0.15) [[ commit created by automation ]] --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent f4561ac commit 01dce08

36 files changed

Lines changed: 1162 additions & 144 deletions

‎NuGet.config‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<clear />
66
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
77
<!-- Begin: Package sources from dotnet-dotnet -->
8-
<add key="darc-pub-dotnet-dotnet-d7437ff" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-d7437ff1/nuget/v3/index.json" />
8+
<add key="darc-pub-dotnet-dotnet-b501678" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-b5016781/nuget/v3/index.json" />
99
<!-- End: Package sources from dotnet-dotnet -->
1010
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1111
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />

‎eng/Version.Details.props‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@ This file should be imported by eng/Versions.props
88
<!-- dotnet-dotnet dependencies -->
99
<MicrosoftBuildFrameworkPackageVersion>15.9.20</MicrosoftBuildFrameworkPackageVersion>
1010
<MicrosoftBuildUtilitiesCorePackageVersion>15.9.20</MicrosoftBuildUtilitiesCorePackageVersion>
11-
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26513.124</MicrosoftDotNetArcadeSdkPackageVersion>
12-
<MicrosoftDotNetCodeAnalysisPackageVersion>10.0.0-beta.26513.124</MicrosoftDotNetCodeAnalysisPackageVersion>
13-
<MicrosoftDotNetGenAPIPackageVersion>10.0.0-beta.26513.124</MicrosoftDotNetGenAPIPackageVersion>
14-
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26513.124</MicrosoftDotNetHelixSdkPackageVersion>
15-
<MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>10.0.14-servicing.26513.124</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>
16-
<MicrosoftNETCoreAppRefPackageVersion>10.0.14</MicrosoftNETCoreAppRefPackageVersion>
17-
<MicrosoftNETCorePlatformsPackageVersion>10.0.14-servicing.26513.124</MicrosoftNETCorePlatformsPackageVersion>
18-
<MicrosoftPrivateWinformsPackageVersion>10.0.14-servicing.26513.124</MicrosoftPrivateWinformsPackageVersion>
11+
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26525.101</MicrosoftDotNetArcadeSdkPackageVersion>
12+
<MicrosoftDotNetCodeAnalysisPackageVersion>10.0.0-beta.26525.101</MicrosoftDotNetCodeAnalysisPackageVersion>
13+
<MicrosoftDotNetGenAPIPackageVersion>10.0.0-beta.26525.101</MicrosoftDotNetGenAPIPackageVersion>
14+
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26525.101</MicrosoftDotNetHelixSdkPackageVersion>
15+
<MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>10.0.15-servicing.26525.101</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>
16+
<MicrosoftNETCoreAppRefPackageVersion>10.0.15</MicrosoftNETCoreAppRefPackageVersion>
17+
<MicrosoftNETCorePlatformsPackageVersion>10.0.15-servicing.26525.101</MicrosoftNETCorePlatformsPackageVersion>
18+
<MicrosoftPrivateWinformsPackageVersion>10.0.15-servicing.26525.101</MicrosoftPrivateWinformsPackageVersion>
1919
<MicrosoftSourceLinkAzureReposGitPackageVersion>8.0.0-beta.23409.2</MicrosoftSourceLinkAzureReposGitPackageVersion>
2020
<MicrosoftSourceLinkGitHubPackageVersion>8.0.0-beta.23409.2</MicrosoftSourceLinkGitHubPackageVersion>
21-
<SystemCodeDomPackageVersion>10.0.14</SystemCodeDomPackageVersion>
22-
<SystemConfigurationConfigurationManagerPackageVersion>10.0.14</SystemConfigurationConfigurationManagerPackageVersion>
23-
<SystemDiagnosticsEventLogPackageVersion>10.0.14</SystemDiagnosticsEventLogPackageVersion>
24-
<SystemDirectoryServicesPackageVersion>10.0.14</SystemDirectoryServicesPackageVersion>
25-
<SystemDrawingCommonPackageVersion>10.0.14</SystemDrawingCommonPackageVersion>
26-
<SystemFormatsNrbfPackageVersion>10.0.14</SystemFormatsNrbfPackageVersion>
27-
<SystemIOPackagingPackageVersion>10.0.14</SystemIOPackagingPackageVersion>
28-
<SystemPrivateWindowsCoreTestUtilitiesPackageVersion>10.0.14-servicing.26513.124</SystemPrivateWindowsCoreTestUtilitiesPackageVersion>
29-
<SystemReflectionMetadataLoadContextPackageVersion>10.0.14</SystemReflectionMetadataLoadContextPackageVersion>
30-
<SystemResourcesExtensionsPackageVersion>10.0.14</SystemResourcesExtensionsPackageVersion>
31-
<SystemRuntimeSerializationFormattersPackageVersion>10.0.14</SystemRuntimeSerializationFormattersPackageVersion>
32-
<SystemSecurityCryptographyXmlPackageVersion>10.0.14</SystemSecurityCryptographyXmlPackageVersion>
33-
<SystemSecurityPermissionsPackageVersion>10.0.14</SystemSecurityPermissionsPackageVersion>
34-
<SystemWindowsExtensionsPackageVersion>10.0.14</SystemWindowsExtensionsPackageVersion>
21+
<SystemCodeDomPackageVersion>10.0.15</SystemCodeDomPackageVersion>
22+
<SystemConfigurationConfigurationManagerPackageVersion>10.0.15</SystemConfigurationConfigurationManagerPackageVersion>
23+
<SystemDiagnosticsEventLogPackageVersion>10.0.15</SystemDiagnosticsEventLogPackageVersion>
24+
<SystemDirectoryServicesPackageVersion>10.0.15</SystemDirectoryServicesPackageVersion>
25+
<SystemDrawingCommonPackageVersion>10.0.15</SystemDrawingCommonPackageVersion>
26+
<SystemFormatsNrbfPackageVersion>10.0.15</SystemFormatsNrbfPackageVersion>
27+
<SystemIOPackagingPackageVersion>10.0.15</SystemIOPackagingPackageVersion>
28+
<SystemPrivateWindowsCoreTestUtilitiesPackageVersion>10.0.15-servicing.26525.101</SystemPrivateWindowsCoreTestUtilitiesPackageVersion>
29+
<SystemReflectionMetadataLoadContextPackageVersion>10.0.15</SystemReflectionMetadataLoadContextPackageVersion>
30+
<SystemResourcesExtensionsPackageVersion>10.0.15</SystemResourcesExtensionsPackageVersion>
31+
<SystemRuntimeSerializationFormattersPackageVersion>10.0.15</SystemRuntimeSerializationFormattersPackageVersion>
32+
<SystemSecurityCryptographyXmlPackageVersion>10.0.15</SystemSecurityCryptographyXmlPackageVersion>
33+
<SystemSecurityPermissionsPackageVersion>10.0.15</SystemSecurityPermissionsPackageVersion>
34+
<SystemWindowsExtensionsPackageVersion>10.0.15</SystemWindowsExtensionsPackageVersion>
3535
<!-- dotnet-wpf-int dependencies -->
3636
<MicrosoftDotNetWpfDncEngPackageVersion>10.0.9-servicing.26521.1</MicrosoftDotNetWpfDncEngPackageVersion>
3737
</PropertyGroup>

‎eng/Version.Details.xml‎

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="wpf" Sha="d7437ff14b570b50cce30b01edbf568a3d1ff933" BarId="336650" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="wpf" Sha="b50167817409d70b2d1926ca0a48247c223b32b0" BarId="338287" />
44
<ProductDependencies>
5-
<Dependency Name="Microsoft.Private.Winforms" Version="10.0.14-servicing.26513.124">
5+
<Dependency Name="Microsoft.Private.Winforms" Version="10.0.15-servicing.26525.101">
66
<Uri>https://github.com/dotnet/dotnet</Uri>
7-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
7+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="10.0.14-servicing.26513.124">
9+
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="10.0.15-servicing.26525.101">
1010
<Uri>https://github.com/dotnet/dotnet</Uri>
11-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
11+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
1212
</Dependency>
13-
<Dependency Name="System.Reflection.MetadataLoadContext" Version="10.0.14">
13+
<Dependency Name="System.Reflection.MetadataLoadContext" Version="10.0.15">
1414
<Uri>https://github.com/dotnet/dotnet</Uri>
15-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
15+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
1616
</Dependency>
17-
<Dependency Name="System.Windows.Extensions" Version="10.0.14">
17+
<Dependency Name="System.Windows.Extensions" Version="10.0.15">
1818
<Uri>https://github.com/dotnet/dotnet</Uri>
19-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
19+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
2020
</Dependency>
21-
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.14-servicing.26513.124">
21+
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.15-servicing.26525.101">
2222
<Uri>https://github.com/dotnet/dotnet</Uri>
23-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
23+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
2424
</Dependency>
2525
<Dependency Name="Microsoft.DotNet.Wpf.DncEng" Version="10.0.9-servicing.26521.1">
2626
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int</Uri>
2727
<Sha>15df8094f81b09497a3d17e0cbd221de97460b59</Sha>
2828
</Dependency>
29-
<Dependency Name="System.Resources.Extensions" Version="10.0.14">
29+
<Dependency Name="System.Resources.Extensions" Version="10.0.15">
3030
<Uri>https://github.com/dotnet/dotnet</Uri>
31-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
31+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
3232
</Dependency>
33-
<Dependency Name="System.Runtime.Serialization.Formatters" Version="10.0.14">
33+
<Dependency Name="System.Runtime.Serialization.Formatters" Version="10.0.15">
3434
<Uri>https://github.com/dotnet/dotnet</Uri>
35-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
35+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.14">
37+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.15">
3838
<Uri>https://github.com/dotnet/dotnet</Uri>
39-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
39+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
4040
</Dependency>
41-
<Dependency Name="System.CodeDom" Version="10.0.14">
41+
<Dependency Name="System.CodeDom" Version="10.0.15">
4242
<Uri>https://github.com/dotnet/dotnet</Uri>
43-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
43+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
4444
</Dependency>
45-
<Dependency Name="System.Configuration.ConfigurationManager" Version="10.0.14">
45+
<Dependency Name="System.Configuration.ConfigurationManager" Version="10.0.15">
4646
<Uri>https://github.com/dotnet/dotnet</Uri>
47-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
47+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
4848
</Dependency>
49-
<Dependency Name="System.Diagnostics.EventLog" Version="10.0.14">
49+
<Dependency Name="System.Diagnostics.EventLog" Version="10.0.15">
5050
<Uri>https://github.com/dotnet/dotnet</Uri>
51-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
51+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
5252
</Dependency>
53-
<Dependency Name="System.DirectoryServices" Version="10.0.14">
53+
<Dependency Name="System.DirectoryServices" Version="10.0.15">
5454
<Uri>https://github.com/dotnet/dotnet</Uri>
55-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
55+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
5656
</Dependency>
57-
<Dependency Name="System.Formats.Nrbf" Version="10.0.14">
57+
<Dependency Name="System.Formats.Nrbf" Version="10.0.15">
5858
<Uri>https://github.com/dotnet/dotnet</Uri>
59-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
59+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
6060
</Dependency>
61-
<Dependency Name="System.IO.Packaging" Version="10.0.14">
61+
<Dependency Name="System.IO.Packaging" Version="10.0.15">
6262
<Uri>https://github.com/dotnet/dotnet</Uri>
63-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
63+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
6464
</Dependency>
65-
<Dependency Name="System.Security.Cryptography.Xml" Version="10.0.14">
65+
<Dependency Name="System.Security.Cryptography.Xml" Version="10.0.15">
6666
<Uri>https://github.com/dotnet/dotnet</Uri>
67-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
67+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
6868
</Dependency>
69-
<Dependency Name="System.Security.Permissions" Version="10.0.14">
69+
<Dependency Name="System.Security.Permissions" Version="10.0.15">
7070
<Uri>https://github.com/dotnet/dotnet</Uri>
71-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
71+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
7272
</Dependency>
73-
<Dependency Name="System.Drawing.Common" Version="10.0.14">
73+
<Dependency Name="System.Drawing.Common" Version="10.0.15">
7474
<Uri>https://github.com/dotnet/dotnet</Uri>
75-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
75+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
7676
</Dependency>
7777
<Dependency Name="Microsoft.Build.Framework" Version="15.9.20">
7878
<Uri>https://github.com/dotnet/dotnet</Uri>
@@ -84,25 +84,25 @@
8484
</Dependency>
8585
</ProductDependencies>
8686
<ToolsetDependencies>
87-
<Dependency Name="System.Private.Windows.Core.TestUtilities" Version="10.0.14-servicing.26513.124">
87+
<Dependency Name="System.Private.Windows.Core.TestUtilities" Version="10.0.15-servicing.26525.101">
8888
<Uri>https://github.com/dotnet/dotnet</Uri>
89-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
89+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
9090
</Dependency>
91-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26513.124">
91+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26525.101">
9292
<Uri>https://github.com/dotnet/dotnet</Uri>
93-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
93+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
9494
</Dependency>
95-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26513.124">
95+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26525.101">
9696
<Uri>https://github.com/dotnet/dotnet</Uri>
97-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
97+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
9898
</Dependency>
99-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26513.124">
99+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26525.101">
100100
<Uri>https://github.com/dotnet/dotnet</Uri>
101-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
101+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
102102
</Dependency>
103-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="10.0.0-beta.26513.124">
103+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="10.0.0-beta.26525.101">
104104
<Uri>https://github.com/dotnet/dotnet</Uri>
105-
<Sha>d7437ff14b570b50cce30b01edbf568a3d1ff933</Sha>
105+
<Sha>b50167817409d70b2d1926ca0a48247c223b32b0</Sha>
106106
</Dependency>
107107
<!-- TODO: Unpin sourcelink dependencies: https://github.com/dotnet/wpf/issues/11042 -->
108108
<Dependency Name="Microsoft.SourceLink.AzureRepos.Git" Version="8.0.0-beta.23409.2" Pinned="true">

‎eng/Versions.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<MajorVersion>10</MajorVersion>
66
<MinorVersion>0</MinorVersion>
7-
<PatchVersion>14</PatchVersion>
7+
<PatchVersion>15</PatchVersion>
88
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
99
<PreReleaseVersionIteration></PreReleaseVersionIteration>
1010
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>

‎global.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "10.0.112",
3+
"version": "10.0.113",
44
"allowPrerelease": true,
55
"rollForward": "latestFeature",
66
"paths": [
@@ -10,7 +10,7 @@
1010
"errorMessage": "The required .NET SDK wasn't found. Please run ./eng/common/dotnet.cmd/sh to install it."
1111
},
1212
"tools": {
13-
"dotnet": "10.0.112",
13+
"dotnet": "10.0.113",
1414
"runtimes": {
1515
"dotnet/x64": [
1616
"$(MicrosoftNETCorePlatformsVersion)"
@@ -24,8 +24,8 @@
2424
}
2525
},
2626
"msbuild-sdks": {
27-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26513.124",
28-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26513.124",
27+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26525.101",
28+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26525.101",
2929
"Microsoft.Build.NoTargets": "3.7.56"
3030
},
3131
"native-tools": {

‎src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/TrueTypeSubsetter/TtfDelta/makeglst.cpp‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,18 @@ CMAP_SUBHEADER_GEN CmapSubHeader;
543543
usMaxGlyphIndexUsed = usGlyphIdx;
544544
++ (usGlyphKeepCount);
545545

546-
GetComponentGlyphList( pInputBufferInfo, usGlyphIdx, &usnComponents, pausComponents, usnMaxComponents, &usnComponentDepth, 0, usIdxToLocFmt, ulLocaOffset, ulGlyfOffset);
546+
if (FONT_SECURITY_CHECKS_ENABLED())
547+
{
548+
int16 errCode = GetComponentGlyphList( pInputBufferInfo, usGlyphIdx, &usnComponents, pausComponents, usnMaxComponents, &usnComponentDepth, 0, usIdxToLocFmt, ulLocaOffset, ulGlyfOffset);
549+
if (errCode != NO_ERROR)
550+
{
551+
usnComponents = 0; /* skip this glyph's components — invalid composite */
552+
}
553+
}
554+
else
555+
{
556+
GetComponentGlyphList( pInputBufferInfo, usGlyphIdx, &usnComponents, pausComponents, usnMaxComponents, &usnComponentDepth, 0, usIdxToLocFmt, ulLocaOffset, ulGlyfOffset);
557+
}
547558
for ( j = 0; j < usnComponents; j++ ) /* check component value before assignment */
548559
{
549560
if ((pausComponents[ j ] < usGlyphListCount) && ((puchKeepGlyphList)[ pausComponents[ j ] ] == 0))

‎src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/TrueTypeSubsetter/TtfDelta/modcmap.cpp‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,16 @@ uint16 usBytesRead;
294294
uint16 usBytesWritten;
295295
uint16 usNewFirstCode= 0xFFFF;
296296
uint16 usNewLastCode=0; /* saved to calc NewEntryCount */
297+
uint16 usOriginalFirstCode; /* saved for rebase calculation */
298+
uint16 usOriginalEntryCount;
297299
uint32 ulInGlyphOffset; /* to point to a glyph value to read */
298300
uint32 ulOutGlyphOffset; /* to point to a glyph value to write */
299301

300302

301303
if ((errCode = ReadGeneric(pOutputBufferInfo, (uint8 *)&CmapFormat6, SIZEOF_CMAP_FORMAT6, CMAP_FORMAT6_CONTROL, ulOffset, &usBytesRead)) != NO_ERROR)
302304
return errCode;
305+
usOriginalFirstCode = CmapFormat6.firstCode;
306+
usOriginalEntryCount = CmapFormat6.entryCount;
303307
ulInGlyphOffset = ulOutGlyphOffset = ulOffset + usBytesRead;
304308
/* first figure out where the start and end are */
305309
for ( i = 0; i < CmapFormat6.entryCount; i++ )
@@ -325,7 +329,30 @@ uint32 ulOutGlyphOffset; /* to point to a glyph value to write */
325329
CmapFormat6.firstCode = usNewFirstCode;
326330
CmapFormat6.entryCount = usNewLastCode - usNewFirstCode+1;
327331

328-
ulInGlyphOffset = ulOutGlyphOffset + usNewFirstCode * sizeof(GlyphIndex); /* where to read the first code */
332+
// Rebase the second-pass source offset by the original firstCode, not usNewFirstCode.
333+
// usNewFirstCode is a character code value; the correct 0-based array index is
334+
// (usNewFirstCode - usOriginalFirstCode). Using usNewFirstCode directly as an index
335+
// skips past the end of the copied glyph array and reads unrelated heap bytes
336+
if (FONT_SECURITY_CHECKS_ENABLED())
337+
{
338+
if (usNewFirstCode < usOriginalFirstCode || usNewLastCode < usOriginalFirstCode)
339+
return ERR_INVALID_CMAP;
340+
341+
uint32 ulArrayIndex = (uint32)(usNewFirstCode - usOriginalFirstCode);
342+
uint32 ulEndIndex = (uint32)(usNewLastCode - usOriginalFirstCode);
343+
/* Validate the read range: end index must not exceed the original entryCount */
344+
if (ulEndIndex >= (uint32)usOriginalEntryCount ||
345+
ulArrayIndex > ulEndIndex)
346+
{
347+
return ERR_INVALID_CMAP;
348+
}
349+
ulInGlyphOffset = ulOutGlyphOffset + ulArrayIndex * sizeof(GlyphIndex);
350+
}
351+
else
352+
{
353+
ulInGlyphOffset = ulOutGlyphOffset + usNewFirstCode * sizeof(GlyphIndex); /* where to read the first code */
354+
}
355+
329356
for ( i = usNewFirstCode; i <= usNewLastCode; i++ )
330357
{
331358
if ((errCode = ReadWord(pOutputBufferInfo, &GlyphIndex, ulInGlyphOffset)) != NO_ERROR)

0 commit comments

Comments
 (0)