From: Ville Syrjälä Date: Tue, 9 Apr 2019 14:40:53 +0000 (+0300) Subject: drm/i915/sdvo: Don't write stack garbage into the hbuf X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7f668346e70fcf1b7b56a9c31fba5070d210995b;p=openwrt%2Fstaging%2Fblogic.git drm/i915/sdvo: Don't write stack garbage into the hbuf Pass the length returned by hdmi_infoframe_pack_only() to intel_sdvo_write_infoframe() so that we don't end up writing stack garbage into the hbuf. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-7-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 1c8ad680813c..6d78fd165642 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1106,7 +1106,7 @@ static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo, return intel_sdvo_write_infoframe(intel_sdvo, SDVO_HBUF_INDEX_AVI_IF, SDVO_HBUF_TX_VSYNC, - sdvo_data, sizeof(sdvo_data)); + sdvo_data, len); } static void intel_sdvo_get_avi_infoframe(struct intel_sdvo *intel_sdvo,