diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-24 09:51:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 09:51:49 +0200 |
commit | 711e372aadbc9f7eff7562a881deed0d4ca51d80 (patch) | |
tree | ec337fdeb4c23049fa35dd4fb595b6788b1eb674 /thirdparty/libwebp/src/enc/webp_enc.c | |
parent | c3a8ec3cbb43cc311d88a1b11aedc4db2785499b (diff) | |
parent | e5e34f21fc36c8a162bb46e845bb3465cd434150 (diff) |
Merge pull request #64787 from akien-mga/libwebp-1.2.4
libwebp: Sync with upstream 1.2.4
Diffstat (limited to 'thirdparty/libwebp/src/enc/webp_enc.c')
-rw-r--r-- | thirdparty/libwebp/src/enc/webp_enc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/thirdparty/libwebp/src/enc/webp_enc.c b/thirdparty/libwebp/src/enc/webp_enc.c index ce2db2e94b..9620e05070 100644 --- a/thirdparty/libwebp/src/enc/webp_enc.c +++ b/thirdparty/libwebp/src/enc/webp_enc.c @@ -336,9 +336,7 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) { if (!WebPValidateConfig(config)) { return WebPEncodingSetError(pic, VP8_ENC_ERROR_INVALID_CONFIGURATION); } - if (pic->width <= 0 || pic->height <= 0) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION); - } + if (!WebPValidatePicture(pic)) return 0; if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION) { return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION); } |