Skip to content

reformat: complete remaining size_t index conversions#3213

Open
metsw24-max wants to merge 1 commit into
AOMediaCodec:mainfrom
metsw24-max:reformat-size_t-index-sweep
Open

reformat: complete remaining size_t index conversions#3213
metsw24-max wants to merge 1 commit into
AOMediaCodec:mainfrom
metsw24-max:reformat-size_t-index-sweep

Conversation

@metsw24-max
Copy link
Copy Markdown
Contributor

Follow up f17110d by converting the remaining loop indices in avifImageYUVAnyToRGBAnySlow() from uint32_t to size_t.

This ensures pointer-offset multiplications involving row strides and pixel offsets are performed in size_t arithmetic rather than
potentially overflowing in 32-bit intermediates.

Changes

  • Convert j and i loop counters to size_t
  • Convert derived chroma indices uvJ and uvI to size_t
  • Remove redundant cast-at-use stride multiplications

Rationale

The earlier sweep in f17110d standardized this approach across other YUV/RGB conversion paths. This patch applies the same fix
pattern to the remaining slow conversion path that was missed.

Testing

  • Build succeeds without warnings
  • Existing conversion paths remain unchanged functionally
  • Large-image stride arithmetic now consistently uses size_t

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