Skip to content

Conversation

@ram-mohan
Copy link
Contributor

No description provided.

@ram-mohan ram-mohan force-pushed the overflow branch 2 times, most recently from 2016f00 to f0bb225 Compare November 4, 2024 01:55
@ram-mohan ram-mohan changed the title Overflow fix possible overflows Nov 4, 2024
@DichenZhang1
Copy link
Collaborator

Hi Ram, I find this change has both fixing overflows and changing color coefficients, and both parts are not related I would recommend we separate those into two CLs

The data type that was used to store the memory required for input raw
buffers was int. This works for normal dimensions. For images where
width and height are very large, say greater than 32768, then rgb input
buffer size is 32768 * 32768 * 4. This computation exceeds integer max
causing issues. This change addresses this by assigning the type for
widths/heights/strides/ as unsigned int and buffer sizes as size_t

Test: ./ultrahdr_unit_test
@ram-mohan
Copy link
Contributor Author

ram-mohan commented Nov 8, 2024

Hi Ram, I find this change has both fixing overflows and changing color coefficients, and both parts are not related I would recommend we separate those into two CLs

Sure Dichen, i have updated the change as per the suggestion.

@DichenZhang1 DichenZhang1 merged commit a265b54 into google:main Nov 8, 2024
@ram-mohan ram-mohan deleted the overflow branch November 8, 2024 05:19
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.

2 participants