SixLabors / ImageSharp

:camera: A modern, cross-platform, 2D Graphics library for .NET
https://sixlabors.com/products/imagesharp/
Other
7.26k stars 844 forks source link

Fix overflow in MemoryAllocator.Create(options) #2730

Closed antonfirsov closed 2 months ago

antonfirsov commented 2 months ago

Prerequisites

Description

Fix an overlook from #2706. See https://github.com/SixLabors/ImageSharp/commit/92b82779ac8e7a032989533bb9a01ef092186b2e#r141770676.

JimBobSquarePants commented 2 months ago

Thanks! We should probably backport this.

antonfirsov commented 2 months ago

We should probably backport this.

Agreed. The bug renders the AllocationLimitMegabytes API pretty useless when it comes to extending the limit.