Skip to content

Commit 04485af

Browse files
jessey-gitssh4net
authored andcommitted
fix(webp): Use correct resolution limits for WebpOutput::open (AcademySoftwareFoundation#5016)
The WebP format is very limited in the maximum resolution it supports. We need to change the values we allow to be much smaller. Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com> Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com> Signed-off-by: Vlad <shaamaan@gmail.com>
1 parent abbe13e commit 04485af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/webp.imageio/webpoutput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ WebpImageWriter(const uint8_t* img_data, size_t data_size,
7373
bool
7474
WebpOutput::open(const std::string& name, const ImageSpec& spec, OpenMode mode)
7575
{
76-
if (!check_open(mode, spec, { 0, 1 << 20, 0, 1 << 20, 0, 1, 0, 4 },
76+
if (!check_open(mode, spec, { 0, 16383, 0, 16383, 0, 1, 0, 4 },
7777
uint64_t(OpenChecks::Disallow1or2Channel)))
7878
return false;
7979

0 commit comments

Comments
 (0)