From: jsg Date: Wed, 25 Jan 2023 01:53:30 +0000 (+0000) Subject: drm/i915/display: Check source height is > 0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e287e4f57e5631ebaa4368bbeba9ee70308bbead;p=openbsd drm/i915/display: Check source height is > 0 From Drew Davenport 597747eb58a7c8deb131f89aad7e136dbb63ef7a in linux-6.1.y/6.1.8 8565c502e7c156d190d8e6d36e443f51b257f165 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/display/skl_universal_plane.c b/sys/dev/pci/drm/i915/display/skl_universal_plane.c index 7cb71304340..bc523a3d1d4 100644 --- a/sys/dev/pci/drm/i915/display/skl_universal_plane.c +++ b/sys/dev/pci/drm/i915/display/skl_universal_plane.c @@ -1620,7 +1620,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state) u32 offset; int ret; - if (w > max_width || w < min_width || h > max_height) { + if (w > max_width || w < min_width || h > max_height || h < 1) { drm_dbg_kms(&dev_priv->drm, "requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n", w, h, min_width, max_width, max_height);