mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Ladybird: Decode images out of process
This patch brings a service to handle image decompression. With it comes security enhancement due to the process boundary. Indeed, consequences of a potential attack is reduced as only the decoder will crash without perturbing the WebContent process. It also allows us to display pages containing images that we claim to support but still make us crash, like for not-finished-yet decoders. As an example, we can now load https://jpegxl.info/jxl-art.html without crashing the WebContent process.
This commit is contained in:
committed by
Andreas Kling
parent
8659a6d3a7
commit
5c7e5cc738
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibImageDecoderClient/Client.h>
|
||||
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
||||
|
||||
namespace Ladybird {
|
||||
@@ -17,6 +18,9 @@ public:
|
||||
virtual ~ImageCodecPlugin() override;
|
||||
|
||||
virtual Optional<Web::Platform::DecodedImage> decode_image(ReadonlyBytes data) override;
|
||||
|
||||
private:
|
||||
RefPtr<ImageDecoderClient::Client> m_client;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user