diff options
| author | Acts1631 <acts1631kjv@proton.me> | 2026-11-13 14:21:15 -0500 |
|---|---|---|
| committer | Acts1631 <acts1631kjv@proton.me> | 2026-11-19 09:38:28 -0500 |
| commit | fbe996f380c717d6d15a8cf5577146ee251aaa1d (patch) | |
| tree | a14c2fcb61602355138eb2ed2610bb42b05afc95 /Source/Core/InputCommon/ImageOperations.h | |
| parent | 2fe162866282fa2806d62f69aa053315d750ab91 (diff) | |
InputCommon: validate dynamic texture regions
Dynamic input texture JSON could specify rectangles outside the base
image. CopyImageRegion then wrote replacement pixels beyond the
destination vector, allowing a crafted local texture pack to corrupt
the heap.
Validate coordinates and image bounds at the parser and caller. Make
CopyImageRegion independently reject invalid source or destination
ranges.
Diffstat (limited to 'Source/Core/InputCommon/ImageOperations.h')
| -rw-r--r-- | Source/Core/InputCommon/ImageOperations.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ImageOperations.h b/Source/Core/InputCommon/ImageOperations.h index 72887d1db2..f4ef7225da 100644 --- a/Source/Core/InputCommon/ImageOperations.h +++ b/Source/Core/InputCommon/ImageOperations.h @@ -44,7 +44,7 @@ struct ImagePixelData u32 height = 0; }; -void CopyImageRegion(const ImagePixelData& src, ImagePixelData& dst, const Rect& src_region, +bool CopyImageRegion(const ImagePixelData& src, ImagePixelData& dst, const Rect& src_region, const Rect& dst_region); std::optional<ImagePixelData> LoadImage(const std::string& path); |
