mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Fix use-after-move in handle_successful_bitmap_decode
Introduced in bd932858
, the code would try to move `result.color_space`
into the ImmutableBitmap created for each single frame of an image. For
animated images, this would result in a use-after-move from the second
frame.
This commit is contained in:
parent
c16c20b836
commit
2249f09267
Notes:
github-actions[bot]
2024-12-06 07:00:34 +00:00
Author: https://github.com/LucasChollet Commit: https://github.com/LadybirdBrowser/ladybird/commit/2249f092679 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2807 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ void SharedResourceRequest::handle_successful_fetch(URL::URL const& url_string,
|
|||
Vector<AnimatedBitmapDecodedImageData::Frame> frames;
|
||||
for (auto& frame : result.frames) {
|
||||
frames.append(AnimatedBitmapDecodedImageData::Frame {
|
||||
.bitmap = Gfx::ImmutableBitmap::create(*frame.bitmap, move(result.color_space)),
|
||||
.bitmap = Gfx::ImmutableBitmap::create(*frame.bitmap, result.color_space),
|
||||
.duration = static_cast<int>(frame.duration),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue