Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Fixing heap corruption when using core text to draw into opaque layers.#1295

Merged
rajsesh merged 1 commit into
microsoft:developfrom
rajsesh:fix_opaque_layer_corruption
Nov 2, 2016
Merged

Fixing heap corruption when using core text to draw into opaque layers.#1295
rajsesh merged 1 commit into
microsoft:developfrom
rajsesh:fix_opaque_layer_corruption

Conversation

@rajsesh

@rajsesh rajsesh commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

Fixing heap corruption when using core text to draw into opaque layers.

The heap corruption happened in an internal test app.

The fix is to use BGRX pixel format for opaque layers - this is supported
by WIC render target.


This change is Reviewable

The heap corruption happened in an internal test app.

The fix is to use BGRX pixel format for opaque layers - this is supported
by WIC render target.
@rajsesh

rajsesh commented Nov 2, 2016

Copy link
Copy Markdown
Contributor Author

@jaredhms is added to the review. #Closed

@msft-Jeyaram

Copy link
Copy Markdown

:shipit:

// target = new CGVectorImage(width, height, _ColorBGR);
} else {
drawContext = _CGBitmapContextCreateWithFormat(width, height, _ColorBGR);
drawContext = _CGBitmapContextCreateWithFormat(width, height, _ColorBGRX);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ight, _ColorBGRX); [](start = 76, length = 18)

how is this related to the heap corruption issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We were allocating 3 bytes per pixel and writing into 4 essentially.

@ms-jihua

ms-jihua commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

:shipit:

1 similar comment
@jaredhms

jaredhms commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

:shipit:

@rajsesh rajsesh merged commit 08b3f98 into microsoft:develop Nov 2, 2016
@rajsesh rajsesh deleted the fix_opaque_layer_corruption branch November 2, 2016 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants