Skip to content

[V3] Clear BMP row padding - #3279

Merged
JimBobSquarePants merged 1 commit into
release/3.2.xfrom
js/bmp-padding-3.2
Nov 23, 2026
Merged

JimBobSquarePants merged 1 commit into
release/3.2.xfrom
js/bmp-padding-3.2

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

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

The 16-bit and 24-bit row writers fill only the pixel bytes of each row. The row buffer came from the memory pool without clearing, so the padding bytes at the end of each row held old pooled data. The encoder now allocates the row buffer clean.

Encode_RowPadding_IsZero uses TestMemoryAllocator, which fills new buffers with a nonzero value.

The 16-bit and 24-bit row writers fill only the pixel bytes. The row buffer
came from the pool without clearing, so the padding bytes held old pooled data.
The row buffer is now allocated clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant