Re: [PATCH] virsh: avoid strncpy

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

 



On 29.05.2012 16:36, Eric Blake wrote:
> strncpy is generally evil - it runs the risk of missing NUL
> termination, and more often than not wastes time zeroing way
> more bytes than strictly necessary.  We've avoided this evil
> in our virStrncpy wrapper, except for places where we forgot
> to use the wrapper; meanwhile, we have also added an even
> higher layer wrapper for setting virTypedParameter values.
> 
> * tools/virsh.c (cmdMemtune, cmdBlkdeviotune): Use modern API.
> * cfg.mk (exclude_file_name_regexp--sc_prohibit_strncpy): Tighten.
> ---
> 
> Noticed this while updating to the latest gnulib.
> 
>  cfg.mk        |    3 +-
>  tools/virsh.c |  149 +++++++++++++++++++++++++++++----------------------------
>  2 files changed, 76 insertions(+), 76 deletions(-)
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]