mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibGfx/TIFF: Ensure baseline tags presence before decoding
This allows us to reject invalid images before trying to decode them. The spec requires more tag to be present[1] but as we don't use them for decoding I don't see the point. [1] - XResolution, YResolution and ResolutionUnit
This commit is contained in:
parent
ec2b4c271f
commit
a31b988473
2 changed files with 26 additions and 10 deletions
|
@ -41,6 +41,7 @@ public:
|
|||
|
||||
ErrorOr<void> decode_frame()
|
||||
{
|
||||
TRY(ensure_baseline_tags_presence(m_metadata));
|
||||
auto maybe_error = decode_frame_impl();
|
||||
|
||||
if (maybe_error.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue