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
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to