]> sourceware.org Git - lvm2.git/commit
lvmlocks: rework dm_strncpy
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 3 Apr 2024 19:01:40 +0000 (21:01 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 4 Apr 2024 17:38:21 +0000 (19:38 +0200)
commit5dec664ccfb67013cd56b76abc1d5152b6bfbad6
tree62719d047c5afdfdeccfed96c8bf11aa6e37fca4
parentf9fefaaabe9aaada73181ce946b97425b2718ece
lvmlocks: rework dm_strncpy

Fix cutting away 1 character via incorrect usage of dm_strncpy
introduced in last batch of commits and use sizeof(buffer) to
get proper sizes.

In case of use strcpy_name_len() the replacement was invalid,
so we need to restore this case since sanlock uses buffer without
nul ending, so we would strip one more character from the buffer.

Also start to use dm_strncpy() without (void) for unchecked usage.
daemons/lvmlockd/lvmlockd-core.c
daemons/lvmlockd/lvmlockd-dlm.c
daemons/lvmlockd/lvmlockd-sanlock.c
This page took 0.030393 seconds and 5 git commands to generate.