[vlc-commits] [Git][videolan/vlc][master] yuvp: assert on bogus palette

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Mar 12 09:38:37 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
dfd6d83e by Steve Lhomme at 2024-03-12T09:23:36+00:00
yuvp: assert on bogus palette

It's better to detect early that the palette is bogus (bad copy, cleaned
format, etc) than write too far in memory.

- - - - -


1 changed file:

- modules/video_chroma/yuvp.c


Changes:

=====================================
modules/video_chroma/yuvp.c
=====================================
@@ -132,6 +132,7 @@ static void Convert( filter_t *p_filter, picture_t *p_source,
         vlc_assert_unreachable();
 
     /* Create a RGBA palette */
+    assert(p_yuvp->i_entries <= VIDEO_PALETTE_COLORS_MAX);
     rgbp.i_entries = p_yuvp->i_entries;
     for( int i = 0; i < p_yuvp->i_entries; i++ )
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfd6d83e505b0eef522dfb244a18f4df628b84c1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfd6d83e505b0eef522dfb244a18f4df628b84c1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list