Safeguard against very large Bitmap creation

Because we rely on the transform `Matrix` returned from the `Canvas` to size a `Bitmap` when using software rendering, an erroneous matrix value can cause a very large Bitmap to be allocated, triggering an OutOfMemory exception.

We've encountered such a situation when using `layoutlib` for screenshot tests, which uses a `NopCanvas` [on initial render](https://cs.android.com/android/_/android/platform/frameworks/layoutlib/+/7b05b277beee599532606e9bb6d7a71f5ca2ab6e:bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java;l=543;bpv=1;bpt=0;drc=085857f145aac790e2a08cf6eb9546f98e26c338) that can return an invalid `Matrix.
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
index 9c2f424..69eb1a3 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
@@ -1798,7 +1798,8 @@
     int renderWidth = (int) Math.ceil(softwareRenderingTransformedBounds.width());
     int renderHeight = (int) Math.ceil(softwareRenderingTransformedBounds.height());
 
-    if (renderWidth <= 0 || renderHeight <= 0) {
+    // Safeguard against errors during Bitmap creation by returning early if dimensions are invalid.
+    if (renderWidth <= 0 || renderHeight <= 0 || renderWidth > bounds.width() || renderHeight > bounds.height()) {
       return;
     }