summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libwebp/src/enc/webp_enc.c
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:08:51 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:08:51 +0300
commit6a1af670d52492ab0955933b830026b2a18ed6d6 (patch)
tree14e423ab81da7312ac0f800aaa6afce7e23abc20 /src/3rdparty/libwebp/src/enc/webp_enc.c
parente57b0df609d744c3ddb2d3f23926a7922e661cb6 (diff)
parent8fb9a4fdcb05984bb6e9e532e4462aa7bfbeb62e (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into tqtc/lts-5.15-opensourcev5.15.11-lts-lgpl
Diffstat (limited to 'src/3rdparty/libwebp/src/enc/webp_enc.c')
-rw-r--r--src/3rdparty/libwebp/src/enc/webp_enc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/3rdparty/libwebp/src/enc/webp_enc.c b/src/3rdparty/libwebp/src/enc/webp_enc.c
index ce2db2e..9620e05 100644
--- a/src/3rdparty/libwebp/src/enc/webp_enc.c
+++ b/src/3rdparty/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);
}