Displaying 3 results from an estimated 3 matches for "_ldm_vol_action".
2018 May 13
0
[PATCH libldm] Fix crash while creating mapper for a volume which lacks all components.
...or "Error in
`ldmtool': free(): invalid pointer: 0x.......".
Reason: _dm_create_spanned and _dm_create_striped functions define
static local variable "static GString *name" which is at the same time a
function return value. It is passed up to the call stack and is freed
in _ldm_vol_action function. An attempt to free the same pointer will
be made if ldmtool successfully creates some volume first and then will
try to create incomplete volume. Which will cause application crash.
---
src/ldm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ldm.c b/src/ld...
2018 May 15
0
[PATCH libldm v2 1/1] Fix crash while creating mapper for a volume which lacks of partitions.
...variable "static GString *name" which is at the same time a
function return value. So variable remains its value in between of
function calls. "name" pointer will be initialized if spanned/stripped
volume is successfully created. It is passed up the call stack and is
freed in _ldm_vol_action function. Next call to the same function with
an attempt to create the volume which misses some partition will fail.
"goto out" statement is executed and pointer to an already freed block
of memory will be returned.
---
src/ldm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(...
2018 May 15
1
[PATCH libldm v2 0/1] Fix crash while creating mapper for a volume which lacks of partitions.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-May/msg00058.html
v2:
- more correct explanation of a crash reason.
Mykola Ivanets (1):
Fix crash while creating mapper for a volume which lacks of
partitions.
src/ldm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.17.0