Check size limit in aom_realloc_frame_buffer.

If CONFIG_SIZE_LIMIT is defined, aom_realloc_frame_buffer should fail if
width or height is too big.

BUG=oss-fuzz:9254
BUG=oss-fuzz:9256
BUG=oss-fuzz:9468

Change-Id: Ied2fb67071b71eeffbf02860e22adbc9ebbf8553
(cherry picked from commit ebc2714d71a834fc32a19eef0a81f51fbc47db01)
diff --git a/aom_scale/generic/yv12config.c b/aom_scale/generic/yv12config.c
index 893e1cc..ca5b690 100644
--- a/aom_scale/generic/yv12config.c
+++ b/aom_scale/generic/yv12config.c
@@ -51,6 +51,10 @@
                              aom_codec_frame_buffer_t *fb,
                              aom_get_frame_buffer_cb_fn_t cb, void *cb_priv) {
   if (ybf) {
+#if CONFIG_SIZE_LIMIT
+    if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) return -1;
+#endif
+
     const int aom_byte_align = (byte_alignment == 0) ? 1 : byte_alignment;
     const int aligned_width = (width + 7) & ~7;
     const int aligned_height = (height + 7) & ~7;