diff --git a/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp b/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp index b4aac6ae17..4ab5747d9b 100644 --- a/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp +++ b/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp @@ -210,7 +210,7 @@ ErrorOr> Font::try_load_from_offset(ReadonlyBytes buffer, u3 for (auto i = 0; i < table_directory.num_tables; i++) { auto& table_record = *TRY(stream.read_in_place()); - if (table_record.length == 0 || Checked::addition_would_overflow(static_cast(table_record.offset), static_cast(table_record.length))) + if (Checked::addition_would_overflow(static_cast(table_record.offset), static_cast(table_record.length))) return Error::from_string_literal("Invalid table offset or length in font"); if (buffer.size() < table_record.offset + table_record.length)