Do not create an SkRawCodec with zero dimensions
Add a test
BUG=skia:3534
BUG=b/33300701
Change-Id: Ifb3a824a36998c5e626c4ad58466845f49d18ebf
Reviewed-on: https://skia-review.googlesource.com/5568
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index d15c710..dd96996 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -648,6 +648,9 @@
test_invalid(r, "empty_images/zero-height.wbmp");
// This image is an ico with an embedded mask-bmp. This is illegal.
test_invalid(r, "invalid_images/mask-bmp-ico.ico");
+#if defined(SK_CODEC_DECODES_RAW) && (!defined(_WIN32))
+ test_invalid(r, "empty_images/zero_height.tiff");
+#endif
}
static void test_invalid_parameters(skiatest::Reporter* r, const char path[]) {