Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Relaxed bmp dimensions validation - #2192

#2192
Merged
JimBobSquarePants merged 7 commits into
SixLabors:mainSixLabors/ImageSharp:mainfrom
smorokin:patch-1smorokin/ImageSharp:patch-1Copy head branch name to clipboard
Sep 9, 2022
Merged

Relaxed bmp dimensions validation#2192
JimBobSquarePants merged 7 commits into
SixLabors:mainSixLabors/ImageSharp:mainfrom
smorokin:patch-1smorokin/ImageSharp:patch-1Copy head branch name to clipboard

Conversation

@smorokin

@smorokin smorokin commented Jul 26, 2022

Copy link
Copy Markdown
Contributor

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 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

Relaxed bmp header dimensions checks so now the maximum possible values are accepted.

@CLAassistant

CLAassistant commented Jul 26, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@brianpopow brianpopow self-assigned this Aug 24, 2022
Comment thread src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs Outdated
@brianpopow
brianpopow marked this pull request as ready for review September 8, 2022 10:20
@brianpopow
brianpopow requested a review from a team September 8, 2022 10:45
/// <summary>
/// Maximum dimensions of a bitmap with or height: 2**31 - 1, since width and height are int32
/// </summary>
private const int MaximumBmpDimension = 2147483647;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not being used?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no, it's no longer used, it's now removed.

@JimBobSquarePants JimBobSquarePants left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for finishing this off.

When I first looked at this, I thought we'd be encoding using one of the older headers using unsigned width/height so thought it would be more complicated.

@JimBobSquarePants
JimBobSquarePants merged commit 8d7d413 into SixLabors:main Sep 9, 2022
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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.