drm/i915/display: Do not zero past infoframes.vsc
authorjsg <jsg@openbsd.org>
Mon, 19 Jul 2021 10:51:58 +0000 (10:51 +0000)
committerjsg <jsg@openbsd.org>
Mon, 19 Jul 2021 10:51:58 +0000 (10:51 +0000)
From Kees Cook
3f9c2a058e61b8df9fef196ad6180fbf9932ed80 in linux 5.10.y/5.10.51
07b72960d2b4a087ff2445e286159e69742069cc in mainline linux

sys/dev/pci/drm/i915/display/intel_dp.c

index 6beb5d1..7f2727c 100644 (file)
@@ -5080,7 +5080,7 @@ static int intel_dp_vsc_sdp_unpack(struct drm_dp_vsc_sdp *vsc,
        if (size < sizeof(struct dp_sdp))
                return -EINVAL;
 
-       memset(vsc, 0, size);
+       memset(vsc, 0, sizeof(*vsc));
 
        if (sdp->sdp_header.HB0 != 0)
                return -EINVAL;