Fix truncated webp images
Bug: b/65290323
If a webp file is truncated such that no rows can be decoded,
WebPIDecGetRGB does not initialize its "last_y" parameter. We use
rowsDecoded (passed as last_y) to determine which remaining rows to
fill.
Check the return value of WebPIDecGetRGB. If it fails (returns null),
or rowsDecoded is <= 0 (matching Chromium's check), return
kInvalidInput, since there is nothing to draw.
Note that this is a change in behavior for Android. Previously we
would decode an empty webp to just a transparent/black rectangle,
whereas now we simply fail. I think this is a change for the better.
Add a test which truncates a file to have 0 rows available and attempts
to decode it. msan verifies that we no longer depend on the
uninitialized value.
Stop attempting to test decoding subsets from an incomplete webp (in
CodecTest.cpp). Unless we have decoded the portion covered by the
subset, this will fail.
Remove test images inc0.webp (from both dm/ and colorspace/) and
inc1.webp. These just decode to transparent rectangles. Replace them
with inc2.webp and inc3.webp, which decode part of the image and then
have to fill with transparent.
Change-Id: I64d40be91c574b45963f9a43d8dd8f4929dd2939
Reviewed-on: https://skia-review.googlesource.com/50303
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: James Zern <jzern@google.com>
diff --git a/infra/bots/assets/skimage/VERSION b/infra/bots/assets/skimage/VERSION
index d99e90e..1758ddd 100644
--- a/infra/bots/assets/skimage/VERSION
+++ b/infra/bots/assets/skimage/VERSION
@@ -1 +1 @@
-29
\ No newline at end of file
+32
\ No newline at end of file
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 65897c7..d75b4be 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -5237,7 +5237,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
}
],
"dimensions": [
@@ -7066,7 +7066,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7114,7 +7114,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7167,7 +7167,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7220,7 +7220,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7273,7 +7273,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7321,7 +7321,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7374,7 +7374,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7422,7 +7422,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7470,7 +7470,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7523,7 +7523,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7571,7 +7571,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7619,7 +7619,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7667,7 +7667,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7715,7 +7715,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7762,7 +7762,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7809,7 +7809,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7856,7 +7856,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7903,7 +7903,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7951,7 +7951,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -7999,7 +7999,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8046,7 +8046,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8093,7 +8093,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8186,7 +8186,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8238,7 +8238,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8290,7 +8290,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8342,7 +8342,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8399,7 +8399,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8451,7 +8451,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8508,7 +8508,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8560,7 +8560,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8617,7 +8617,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8669,7 +8669,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8726,7 +8726,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8778,7 +8778,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8830,7 +8830,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8882,7 +8882,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8934,7 +8934,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -8981,7 +8981,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9033,7 +9033,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9085,7 +9085,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9132,7 +9132,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9184,7 +9184,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9236,7 +9236,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9288,7 +9288,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9340,7 +9340,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9387,7 +9387,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9434,7 +9434,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9481,7 +9481,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9528,7 +9528,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9575,7 +9575,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9622,7 +9622,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9669,7 +9669,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9716,7 +9716,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9763,7 +9763,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9810,7 +9810,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9857,7 +9857,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9904,7 +9904,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9951,7 +9951,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -9998,7 +9998,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10045,7 +10045,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10092,7 +10092,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10139,7 +10139,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10186,7 +10186,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10233,7 +10233,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10280,7 +10280,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10327,7 +10327,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10374,7 +10374,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10421,7 +10421,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10469,7 +10469,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10517,7 +10517,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10564,7 +10564,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10611,7 +10611,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10658,7 +10658,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10705,7 +10705,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10752,7 +10752,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10799,7 +10799,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10846,7 +10846,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10893,7 +10893,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10940,7 +10940,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -10987,7 +10987,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11034,7 +11034,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11081,7 +11081,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11129,7 +11129,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11177,7 +11177,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11225,7 +11225,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11273,7 +11273,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11320,7 +11320,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11367,7 +11367,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11414,7 +11414,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11461,7 +11461,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11508,7 +11508,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11555,7 +11555,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11602,7 +11602,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11649,7 +11649,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11696,7 +11696,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11743,7 +11743,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11791,7 +11791,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11839,7 +11839,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11887,7 +11887,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11935,7 +11935,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -11983,7 +11983,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12031,7 +12031,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12079,7 +12079,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12127,7 +12127,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12175,7 +12175,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12223,7 +12223,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12271,7 +12271,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12319,7 +12319,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -12367,7 +12367,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14431,7 +14431,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14479,7 +14479,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14532,7 +14532,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14585,7 +14585,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14638,7 +14638,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14686,7 +14686,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14739,7 +14739,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14787,7 +14787,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14835,7 +14835,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14883,7 +14883,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14931,7 +14931,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -14984,7 +14984,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15037,7 +15037,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15085,7 +15085,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15133,7 +15133,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15181,7 +15181,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15229,7 +15229,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15277,7 +15277,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15324,7 +15324,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15371,7 +15371,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15418,7 +15418,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15465,7 +15465,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15513,7 +15513,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15561,7 +15561,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15609,7 +15609,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15656,7 +15656,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15703,7 +15703,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15750,7 +15750,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15866,7 +15866,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15918,7 +15918,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -15970,7 +15970,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16022,7 +16022,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16079,7 +16079,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16131,7 +16131,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16188,7 +16188,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16240,7 +16240,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16297,7 +16297,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16349,7 +16349,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16406,7 +16406,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16458,7 +16458,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16510,7 +16510,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16562,7 +16562,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16614,7 +16614,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16661,7 +16661,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16713,7 +16713,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16765,7 +16765,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16812,7 +16812,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16864,7 +16864,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16916,7 +16916,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -16968,7 +16968,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17015,7 +17015,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17067,7 +17067,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17119,7 +17119,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17171,7 +17171,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17218,7 +17218,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17265,7 +17265,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17312,7 +17312,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17359,7 +17359,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17406,7 +17406,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17453,7 +17453,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17500,7 +17500,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17547,7 +17547,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17594,7 +17594,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17641,7 +17641,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17688,7 +17688,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17735,7 +17735,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17782,7 +17782,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17829,7 +17829,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17876,7 +17876,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17923,7 +17923,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -17970,7 +17970,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18017,7 +18017,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18064,7 +18064,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18111,7 +18111,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18158,7 +18158,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18205,7 +18205,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18252,7 +18252,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18299,7 +18299,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18347,7 +18347,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18395,7 +18395,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18442,7 +18442,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18489,7 +18489,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18536,7 +18536,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18583,7 +18583,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18630,7 +18630,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18677,7 +18677,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18724,7 +18724,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18771,7 +18771,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18818,7 +18818,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18865,7 +18865,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18912,7 +18912,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -18960,7 +18960,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19008,7 +19008,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19056,7 +19056,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19104,7 +19104,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19151,7 +19151,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19198,7 +19198,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19245,7 +19245,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19292,7 +19292,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19339,7 +19339,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19386,7 +19386,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19434,7 +19434,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19482,7 +19482,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19530,7 +19530,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19578,7 +19578,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19626,7 +19626,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19674,7 +19674,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19722,7 +19722,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19770,7 +19770,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19818,7 +19818,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19866,7 +19866,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19914,7 +19914,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -19962,7 +19962,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20010,7 +20010,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20058,7 +20058,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20106,7 +20106,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20154,7 +20154,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20202,7 +20202,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20250,7 +20250,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
@@ -20298,7 +20298,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:29"
+ "version": "version:32"
},
{
"name": "skia/bots/skp",
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 864fa96..baf3468 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -549,7 +549,7 @@
return kInvalidInput;
}
- int rowsDecoded;
+ int rowsDecoded = 0;
SkCodec::Result result;
switch (WebPIUpdate(idec, frame.fragment.bytes, frame.fragment.size)) {
case VP8_STATUS_OK:
@@ -557,7 +557,10 @@
result = kSuccess;
break;
case VP8_STATUS_SUSPENDED:
- WebPIDecGetRGB(idec, &rowsDecoded, nullptr, nullptr, nullptr);
+ if (!WebPIDecGetRGB(idec, &rowsDecoded, nullptr, nullptr, nullptr)
+ || rowsDecoded <= 0) {
+ return kInvalidInput;
+ }
*rowsDecodedPtr = rowsDecoded + dstY;
result = kIncompleteInput;
break;
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 6e253d2..91b07ef 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -388,10 +388,6 @@
if (supportsSubsetDecoding) {
if (expectedResult == SkCodec::kSuccess) {
REPORTER_ASSERT(r, result == expectedResult);
- } else {
- SkASSERT(expectedResult == SkCodec::kIncompleteInput);
- REPORTER_ASSERT(r, result == SkCodec::kIncompleteInput
- || result == SkCodec::kSuccess);
}
// Webp is the only codec that supports subsets, and it will have modified the subset
// to have even left/top.
@@ -1513,3 +1509,24 @@
test_encode_icc(r, SkEncodedImageFormat::kJPEG, SkTransferFunctionBehavior::kIgnore);
test_encode_icc(r, SkEncodedImageFormat::kWEBP, SkTransferFunctionBehavior::kIgnore);
}
+
+DEF_TEST(Codec_webp_rowsDecoded, r) {
+ const char* path = "baby_tux.webp";
+ sk_sp<SkData> data(GetResourceAsData(path));
+ if (!data) {
+ return;
+ }
+
+ // Truncate this file so that the header is available but no rows can be
+ // decoded. This should create a codec but fail to decode.
+ size_t truncatedSize = 5000;
+ sk_sp<SkData> subset = SkData::MakeSubset(data.get(), 0, truncatedSize);
+ std::unique_ptr<SkCodec> codec = SkCodec::MakeFromData(std::move(subset));
+ if (!codec) {
+ ERRORF(r, "Failed to create a codec for %s truncated to only %lu bytes",
+ path, truncatedSize);
+ return;
+ }
+
+ test_info(r, codec.get(), codec->getInfo(), SkCodec::kInvalidInput, nullptr);
+}