From: Imre Deak Date: Fri, 29 Jan 2016 12:52:29 +0000 (+0200) Subject: drm/i915: Properly terminate KMS mode name string during tv init X-Git-Tag: v4.14-rc1~2738^2~45^2~706 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05d25214c4d1cab99d1056f99b7e7d95e9e31ed0;p=platform%2Fkernel%2Flinux-rpi.git drm/i915: Properly terminate KMS mode name string during tv init Signed-off-by: Imre Deak Reviewed-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/1454071949-24677-4-git-send-email-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 948cbff..5034b00 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -1420,6 +1420,7 @@ intel_tv_get_modes(struct drm_connector *connector) if (!mode_ptr) continue; strncpy(mode_ptr->name, input->name, DRM_DISPLAY_MODE_LEN); + mode_ptr->name[DRM_DISPLAY_MODE_LEN - 1] = '\0'; mode_ptr->hdisplay = hactive_s; mode_ptr->hsync_start = hactive_s + 1;