Skip to content

Conversation

@jeffska
Copy link

@jeffska jeffska commented Jan 30, 2021

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Changes memory length guards in Image.WrapMemory() methods to allow passing blocks that are larger than the image size. Fixes #1522.

@CLAassistant
Copy link

CLAassistant commented Jan 30, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jan 30, 2021

Codecov Report

Merging #1526 (54a22ef) into master (78d23c5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1526   +/-   ##
=======================================
  Coverage   83.50%   83.50%           
=======================================
  Files         742      742           
  Lines       32801    32801           
  Branches     3671     3671           
=======================================
  Hits        27392    27392           
  Misses       4691     4691           
  Partials      718      718           
Flag Coverage Δ
unittests 83.50% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ImageSharp/Image.WrapMemory.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55678db...54a22ef. Read the comment docs.

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@JimBobSquarePants JimBobSquarePants merged commit 7dfea13 into SixLabors:master Feb 2, 2021
JimBobSquarePants added a commit that referenced this pull request Mar 13, 2021
Change size guards for WrapMemory to allow Memory/IMemoryOwner blocks to be larger than the image size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image.WrapMemory methods using Memory<T> or IMemoryOwner<T> do not allow blocks larger than the image size

3 participants