mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibGfx: Make Lut16TagData and Lut8TagData ctors verify table sizes
The from_bytes() methods error out on invalid table sizes, but let's make sure other potential future callers get it right too.
This commit is contained in:
parent
51be964884
commit
4bafdaba3f
1 changed files with 8 additions and 0 deletions
|
@ -201,6 +201,11 @@ public:
|
|||
{
|
||||
VERIFY(m_input_tables.size() == number_of_input_channels * number_of_input_table_entries);
|
||||
VERIFY(m_output_tables.size() == number_of_output_channels * number_of_output_table_entries);
|
||||
|
||||
VERIFY(number_of_input_table_entries >= 2);
|
||||
VERIFY(number_of_input_table_entries <= 4096);
|
||||
VERIFY(number_of_output_table_entries >= 2);
|
||||
VERIFY(number_of_output_table_entries <= 4096);
|
||||
}
|
||||
|
||||
EMatrix3x3 const& e_matrix() const { return m_e; }
|
||||
|
@ -255,6 +260,9 @@ public:
|
|||
{
|
||||
VERIFY(m_input_tables.size() == number_of_input_channels * number_of_input_table_entries);
|
||||
VERIFY(m_output_tables.size() == number_of_output_channels * number_of_output_table_entries);
|
||||
|
||||
VERIFY(number_of_input_table_entries == 256);
|
||||
VERIFY(number_of_output_table_entries == 256);
|
||||
}
|
||||
|
||||
EMatrix3x3 const& e_matrix() const { return m_e; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue