mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 00:25:23 +00:00
583bdfa65c
The strncpy() function has this quirk where it will copy *up* to the requested number of bytes, that is, it will stop early if it encounters a NULL byte in the source string. This makes it legal to pass the size of the destination buffer (minus one byte needed for the string terminator) as the number of bytes to copy and still get something somewhat reasonable out of the operation; unfortunately, it also makes the function difficult to reason about and way too easy to misuse. We want to move away from the way strncpy() behaves and towards better defined semantics, where virStrncpy() will always copy *exactly* the number of bytes it's been asked to copy; before we can do that, though, we have to change a few of the callers. Signed-off-by: Andrea Bolognani <abologna@redhat.com> |
||
---|---|---|
.. | ||
domain_lock.c | ||
domain_lock.h | ||
libvirt_lockd.aug | ||
libvirt_sanlock.aug | ||
lock_daemon_config.c | ||
lock_daemon_config.h | ||
lock_daemon_dispatch.c | ||
lock_daemon_dispatch.h | ||
lock_daemon.c | ||
lock_daemon.h | ||
lock_driver_lockd.c | ||
lock_driver_lockd.h | ||
lock_driver_nop.c | ||
lock_driver_nop.h | ||
lock_driver_sanlock.c | ||
lock_driver.h | ||
lock_manager.c | ||
lock_manager.h | ||
lock_protocol.x | ||
lockd.conf | ||
Makefile.inc.am | ||
sanlock_helper.c | ||
sanlock.conf | ||
test_libvirt_lockd.aug.in | ||
test_libvirt_sanlock.aug.in | ||
test_virtlockd.aug.in | ||
virtlockd-admin.socket.in | ||
virtlockd.aug | ||
virtlockd.conf | ||
virtlockd.init.in | ||
virtlockd.pod | ||
virtlockd.service.in | ||
virtlockd.socket.in | ||
virtlockd.sysconf |