| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
FX_SAFE_UINT32 safe_pitch = bytes_per_pixel;Pre-existing: I wonder if this should just use `bitmap->GetPitch()` instead.
if (!safe_output_size.IsValid()) {And if `bitmap` has valid dimensions and pitch, then will this ever fail?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
FX_SAFE_UINT32 safe_pitch = bytes_per_pixel;Pre-existing: I wonder if this should just use `bitmap->GetPitch()` instead.
Acknowledged
if (!safe_output_size.IsValid()) {And if `bitmap` has valid dimensions and pitch, then will this ever fail?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
FX_SAFE_UINT32 safe_pitch = bytes_per_pixel;Tom SepezPre-existing: I wonder if this should just use `bitmap->GetPitch()` instead.
Acknowledged
Acknowledged
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
FX_SAFE_UINT32 safe_pitch = bytes_per_pixel;Tom SepezPre-existing: I wonder if this should just use `bitmap->GetPitch()` instead.
Tom SepezAcknowledged
Acknowledged
My other idea is to use `bitmap->GetPitch()` and `bitmap->GetBuffer().size()` to get `src_pitch` and `output_size`, respectively.
if (!safe_output_size.IsValid()) {Tom SepezAnd if `bitmap` has valid dimensions and pitch, then will this ever fail?
See linked issue for discussion.
Oh, I guess it's because it's using int here instead of uint32_t. I guess we might as well go with FX_SAFE_UINT32.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Use safe arithmetic in CFX_PSRenderer::DrawDIBits()
Hardening suggestion from the AI bot.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |