From: Jani Nikula Date: Wed, 16 Dec 2015 13:04:19 +0000 (+0200) Subject: drm/i915/bios: fix format string of the VBT signature logging X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3556dd408232e1d0dea7e24eea217a3d1185bfc0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915/bios: fix format string of the VBT signature logging Specify the maximum number of letters to print from the potentially unterminated buffer, not the minimum. While at it, use sizeof instead of a magic number. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1450271061-32646-2-git-send-email-jani.nikula@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index dc3a0fb1946c..4c9304e92ff5 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -1326,8 +1326,8 @@ intel_bios_init(struct drm_device *dev) bdb = get_bdb_header(vbt); - DRM_DEBUG_KMS("VBT signature \"%20s\", BDB version %d\n", - vbt->signature, bdb->version); + DRM_DEBUG_KMS("VBT signature \"%.*s\", BDB version %d\n", + (int)sizeof(vbt->signature), vbt->signature, bdb->version); /* Grab useful general definitions */ parse_general_features(dev_priv, bdb);