Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
8da73eda by Francois Cartegnie at 2022-10-20T04:08:41+00:00
demux: image: check all BMP header sizes

- - - - -


1 changed file:

- modules/demux/image.c


Changes:

=====================================
modules/demux/image.c
=====================================
@@ -325,9 +325,8 @@ static bool IsBmp(stream_t *s)
         return false;
     if (data_offset < header_size + 14)
         return false;
-    if (header_size != 12 && header_size < 40)
-        return false;
-    return true;
+    static const uint8_t header_sizes[] = { 12, 40, 56, 64, 108, 124 };
+    return memchr(header_sizes, header_size, ARRAY_SIZE(header_sizes)) != NULL;
 }
 
 static bool IsPcx(stream_t *s)



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

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to