Re: [PATCH 4/4] drm/i915: Properly terminate KMS mode name string during tv init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 29, 2016 at 02:52:29PM +0200, Imre Deak wrote:
> Caught by Coverity.
> 
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>

Reviewed-by: David Weinehall <david.weinehall@xxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux