Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big-endian fix: Accessing OBJECTHEADER in ImageConverter #50499

Merged
merged 2 commits into from
Apr 1, 2021
Merged

Big-endian fix: Accessing OBJECTHEADER in ImageConverter #50499

merged 2 commits into from
Apr 1, 2021

Conversation

uweigand
Copy link
Contributor

The GetBitmapStream routine in ImageConverter is supposed to
skip an embedded OBJECTHEADER structure. However, this
structure needs to be read in little-endian mode, not in
native byte order.

Fixes the ImageConverterTest.ImageWithOleHeader test on
big-endian systems.

@ghost
Copy link

ghost commented Mar 31, 2021

Tagging subscribers to this area: @safern, @tarekgh
See info in area-owners.md if you want to be subscribed.

Issue Details

The GetBitmapStream routine in ImageConverter is supposed to
skip an embedded OBJECTHEADER structure. However, this
structure needs to be read in little-endian mode, not in
native byte order.

Fixes the ImageConverterTest.ImageWithOleHeader test on
big-endian systems.

Author: uweigand
Assignees: -
Labels:

area-System.Drawing

Milestone: -

Copy link
Member

@safern safern 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!

The GetBitmapStream routine in ImageConverter is supposed to
skip an embedded OBJECTHEADER structure.  However, this
structure needs to be read in little-endian mode, not in
native byte order.

Fixes the ImageConverterTest.ImageWithOleHeader test on
big-endian systems.
Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks

@stephentoub stephentoub merged commit 78acffe into dotnet:main Apr 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants