Re: [PATCH 1/2] leds: mlxreg: Fix possible buffer overflow

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

 



On Tue 2019-09-03 21:11:30, Oleh Kravchenko wrote:
> Hi Pavel,
> 
> 3 вер. 2019 р. о 17:12 Pavel Machek <pavel@xxxxxx> пише:
> 
> >> On Tue 2019-09-03 15:50:19, Oleh Kravchenko wrote:
> >> Error was detected by PVS-Studio:
> >> V512 A call of the 'sprintf' function will lead to overflow of
> >> the buffer 'led_data->led_cdev_name'.
> > 
> > Are you sure this is correct fix? Will the name be always properly
> > null terminated?
> 
> snprintf() always terminate string by NULL

You are right, sorry for the noise.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux