Re: [PATCH v2] Monitor: use devname as char array instead of pointer

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

 



On 6/6/22 06:34, Kinga Tanska wrote:
> Device name wasn't filled properly due to incorrect use of strcpy.
> Strcpy was used twice. Firstly to fill devname with "/dev/md/"
> and then to add chosen name. First strcpy result was overwritten by
> second one (as a result <device_name> instead of "/dev/md/<device_name>"
> was assigned). This commit changes this implementation to use snprintf
> and devname with fixed size. Also safer string functions are propagated.
> 
> Signed-off-by: Kinga Tanska <kinga.tanska@xxxxxxxxx>
> ---
>  Monitor.c | 30 +++++++++++-------------------
>  1 file changed, 11 insertions(+), 19 deletions(-)

This doesn't seem to apply cleanly. Mind sending an updated version?

Thanks,
Jes





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux