Fix Icon creation on Unix when an icon has a PNG image under its directory images...
authorSantiago Fernandez Madero <safern@microsoft.com>
Tue, 21 Aug 2018 00:55:23 +0000 (17:55 -0700)
committerGitHub <noreply@github.com>
Tue, 21 Aug 2018 00:55:23 +0000 (17:55 -0700)
commitc0c11d596a6bd18f5ce4dc3e8595eca89add0d0b
tree7101897c079e3f5189febc398743ad2246c86084
parente6707cf97356fdeb8ed4d368d814f892c123363b
Fix Icon creation on Unix when an icon has a PNG image under its directory images (dotnet/corefx#31819)

* Fix Icon overflow bug when image entry is a PNG file

* Add checked to possible overflown operations

* Minor refactors

* Move disposable readers into using statements and fix some comments

* PR Feedback

* Add tests for Unix Icon fix when icon is PNG

* Fix build failure

Commit migrated from https://github.com/dotnet/corefx/commit/05d5e37a0b08a4fd6671385ed123d9ad279d1d70
src/libraries/System.Drawing.Common/src/Resources/Strings.resx
src/libraries/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs
src/libraries/System.Drawing.Common/tests/IconTests.cs
src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj
src/libraries/System.Drawing.Design.Primitives/tests/System.Drawing.Design.Primitives.Tests.csproj
src/libraries/external/test-runtime/XUnit.Runtime.depproj