intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/4] drm/i915: Properly terminate KMS mode name string during tv init
Date: Fri, 29 Jan 2016 14:52:29 +0200	[thread overview]
Message-ID: <1454071949-24677-4-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1454071949-24677-1-git-send-email-imre.deak@intel.com>

Caught by Coverity.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_tv.c | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-01-29 12:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 12:52 [PATCH 1/4] drm/i915: Sanity check DP AUX message buffer and size Imre Deak
2016-01-29 12:52 ` [PATCH 2/4] drm/i915/chv: Fix error path in GPU freq helpers Imre Deak
2016-01-29 13:55   ` David Weinehall
2016-01-29 12:52 ` [PATCH 3/4] drm/i915: Add debug info for failed MSI enabling Imre Deak
2016-01-29 13:58   ` David Weinehall
2016-01-29 12:52 ` Imre Deak [this message]
2016-01-29 14:00   ` [PATCH 4/4] drm/i915: Properly terminate KMS mode name string during tv init David Weinehall
2016-01-29 13:04 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] drm/i915: Sanity check DP AUX message buffer and size Patchwork
2016-01-29 13:19 ` ✓ Fi.CI.BAT: success " Patchwork
2016-02-02 16:34   ` Imre Deak
2016-01-29 13:54 ` [PATCH 1/4] " David Weinehall
2016-02-01  6:12 ` Thulasimani, Sivakumar
2016-02-01 11:38   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454071949-24677-4-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).