Re: [PATCH] Staging: comedi: Replaced strlcpy to strscpy

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

 



On 18/02/2021 14:31, chakravarthikulkarni wrote:
> Warning found by checkpath.pl script.
> 
> Signed-off-by: chakravarthikulkarni <chakravarthikulkarni2021@xxxxxxxxx>
> ---
>  drivers/staging/comedi/comedi_fops.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> index 80d74cce2a01..df77b6bf5c64 100644
> --- a/drivers/staging/comedi/comedi_fops.c
> +++ b/drivers/staging/comedi/comedi_fops.c
> @@ -939,8 +939,8 @@ static int do_devinfo_ioctl(struct comedi_device *dev,
>  	/* fill devinfo structure */
>  	devinfo.version_code = COMEDI_VERSION_CODE;
>  	devinfo.n_subdevs = dev->n_subdevices;
> -	strlcpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
> -	strlcpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
> +	strscpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
> +	strscpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
>  
>  	s = comedi_file_read_subdevice(file);
>  	if (s)
> 

Thanks, but you are too late.  It has already been fixed in linux-next.

-- 
-=( Ian Abbott <abbotti@xxxxxxxxx> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux