mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix segfault in 'dmsetup status' without --showkeys against crypt target. [nec]
This commit is contained in:
parent
477ec611d5
commit
b6172b53fd
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.19 -
|
Version 1.02.19 -
|
||||||
====================================
|
====================================
|
||||||
|
Fix segfault in 'dmsetup status' without --showkeys against crypt target.
|
||||||
Deal with some more compiler warnings.
|
Deal with some more compiler warnings.
|
||||||
Introduce _add_field() and _is_same_field() to libdm-report.c.
|
Introduce _add_field() and _is_same_field() to libdm-report.c.
|
||||||
Fix some libdevmapper-event and dmeventd memory leaks.
|
Fix some libdevmapper-event and dmeventd memory leaks.
|
||||||
|
@ -962,17 +962,18 @@ static int _status(int argc, char **argv, void *data)
|
|||||||
if (data && !_switches[VERBOSE_ARG])
|
if (data && !_switches[VERBOSE_ARG])
|
||||||
printf("%s: ", name);
|
printf("%s: ", name);
|
||||||
if (target_type) {
|
if (target_type) {
|
||||||
|
/* Suppress encryption key */
|
||||||
/* Suppress encryption key */
|
if (!_switches[SHOWKEYS_ARG] &&
|
||||||
if (!_switches[SHOWKEYS_ARG] &&
|
cmd == DM_DEVICE_TABLE &&
|
||||||
!strcmp(target_type, "crypt")) {
|
!strcmp(target_type, "crypt")) {
|
||||||
c = params;
|
c = params;
|
||||||
while (*c && *c != ' ')
|
while (*c && *c != ' ')
|
||||||
c++;
|
c++;
|
||||||
c++;
|
if (*c)
|
||||||
while (*c && *c != ' ')
|
c++;
|
||||||
*c++ = '0';
|
while (*c && *c != ' ')
|
||||||
}
|
*c++ = '0';
|
||||||
|
}
|
||||||
printf("%" PRIu64 " %" PRIu64 " %s %s",
|
printf("%" PRIu64 " %" PRIu64 " %s %s",
|
||||||
start, length, target_type, params);
|
start, length, target_type, params);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user