Commit d6b4ea86 authored by Dominique Martinet's avatar Dominique Martinet Committed by Chris Wilson

drm/i915/tv: fix strncpy truncation warning

Change it to use strlcpy instead
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712074103.21571-1-chris@chris-wilson.co.ukSigned-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 91045034
...@@ -1347,8 +1347,7 @@ intel_tv_get_modes(struct drm_connector *connector) ...@@ -1347,8 +1347,7 @@ intel_tv_get_modes(struct drm_connector *connector)
mode_ptr = drm_mode_create(connector->dev); mode_ptr = drm_mode_create(connector->dev);
if (!mode_ptr) if (!mode_ptr)
continue; continue;
strncpy(mode_ptr->name, input->name, DRM_DISPLAY_MODE_LEN); strlcpy(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->hdisplay = hactive_s;
mode_ptr->hsync_start = hactive_s + 1; mode_ptr->hsync_start = hactive_s + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment