mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 00:09:44 +00:00
LibGfx: VERIFY correct type length in PNGChunk ctor
This commit is contained in:
parent
bc248d28f7
commit
1db0883fea
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/nico
Commit: 1db0883fea
Pull-request: https://github.com/SerenityOS/serenity/pull/17863
1 changed files with 2 additions and 0 deletions
|
@ -48,6 +48,8 @@ private:
|
|||
PNGChunk::PNGChunk(String type)
|
||||
: m_type(move(type))
|
||||
{
|
||||
VERIFY(m_type.bytes().size() == 4);
|
||||
|
||||
// NOTE: These are MUST() because they should always be able to fit in m_data's inline capacity.
|
||||
MUST(add_as_big_endian<data_length_type>(0));
|
||||
MUST(store_type());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue