mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-29 15:22:30 +03:00
libdm: fix invalid conversion
Previous commit missed to also add one to added 'len'.
This commit is contained in:
parent
4dda6d1555
commit
2f3fcbd245
@ -1451,8 +1451,8 @@ struct node_op_parms {
|
|||||||
|
|
||||||
static void _store_str(char **pos, char **ptr, const char *str)
|
static void _store_str(char **pos, char **ptr, const char *str)
|
||||||
{
|
{
|
||||||
size_t len = strlen(str);
|
size_t len = strlen(str) + 1;
|
||||||
memcpy(*pos, str, len + 1);
|
memcpy(*pos, str, len);
|
||||||
*ptr = *pos;
|
*ptr = *pos;
|
||||||
*pos += len;
|
*pos += len;
|
||||||
}
|
}
|
||||||
|
@ -1449,8 +1449,8 @@ struct node_op_parms {
|
|||||||
|
|
||||||
static void _store_str(char **pos, char **ptr, const char *str)
|
static void _store_str(char **pos, char **ptr, const char *str)
|
||||||
{
|
{
|
||||||
size_t len = strlen(str);
|
size_t len = strlen(str) + 1;
|
||||||
memcpy(*pos, str, len + 1);
|
memcpy(*pos, str, len);
|
||||||
*ptr = *pos;
|
*ptr = *pos;
|
||||||
*pos += len;
|
*pos += len;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user