mirror of https://gitee.com/openkylin/libvirt.git
03d777f345
Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: Chris Lalancette <clalance@redhat.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile.am | ||
THREADING.txt | ||
dispatch.c | ||
dispatch.h | ||
event.c | ||
event.h | ||
libvirtd.aug | ||
libvirtd.c | ||
libvirtd.conf | ||
libvirtd.h | ||
libvirtd.init.in | ||
libvirtd.logrotate.in | ||
libvirtd.policy-0 | ||
libvirtd.policy-1 | ||
libvirtd.sasl | ||
libvirtd.sysconf | ||
mdns.c | ||
mdns.h | ||
remote.c | ||
remote.h | ||
remote_dispatch_args.h | ||
remote_dispatch_prototypes.h | ||
remote_dispatch_ret.h | ||
remote_dispatch_table.h | ||
remote_generate_stubs.pl | ||
test_libvirtd.aug |