[vlc-commits] [Git][videolan/vlc][master] codec: omxil: fix previous overflow check
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Aug 27 13:24:01 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7c14f33f by François Cartegnie at 2026-08-27T12:57:22+00:00
codec: omxil: fix previous overflow check
was truncating the final result
bogus 41db420818b2fd0a9e29449bbf2130ea33cbc404
- - - - -
1 changed file:
- modules/codec/omxil/utils.c
Changes:
=====================================
modules/codec/omxil/utils.c
=====================================
@@ -742,14 +742,18 @@ int GetVlcChromaSizes( vlc_fourcc_t i_fourcc,
return 0;
/* Align on macroblock boundary */
- width = (width + 15) & ~0xF;
- height = (height + 15) & ~0xF;
+ if( ckd_add( &width, width, 15 ) ||
+ ckd_add( &height, height, 15 ) )
+ return 0;
+ width &= ~0xF;
+ height &= ~0xF;
if( size )
{
if( ckd_mul( size, width, height ) ||
- ckd_mul( size, *size, chroma_format_table[i].i_size_mul / 2 ) )
+ ckd_mul( size, *size, chroma_format_table[i].i_size_mul ) )
return 0;
+ *size /= 2;
}
if( pitch )
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7c14f33fdc0071ef5337684379d3f570ee9d1c09
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7c14f33fdc0071ef5337684379d3f570ee9d1c09
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list