]> sourceware.org Git - lvm2.git/commit
Fix segfault when invalid field given in reporting commands.
authorDave Wysochanski <dwysocha@redhat.com>
Mon, 15 Dec 2008 13:30:45 +0000 (13:30 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Mon, 15 Dec 2008 13:30:45 +0000 (13:30 +0000)
commit5b655dd4cdbf0c6a43cbfd66f38ff293d8cfd1e0
tree26a3afe46f63d26ae993cf966e3ed531c760334e
parent023a61c0e594d4f56fde30d74c2fb248510472a9
Fix segfault when invalid field given in reporting commands.

Problem is dm_report_init() may return NULL and subsequent call to
dm_report_set_output_field_name_prefix() doesn't handle NULL value.

Example:
pvs --nameprefixes --rows --unquoted --noheadings -opv_name,fred
  Logical Volume Fields
  ---------------------
    lv_uuid              - Unique identifier
    lv_name              - Name.  LVs created for internal use are enclosed in brackets.
 ...

  Physical Volume Segment Fields
  ------------------------------
    pvseg_start          - Physical Extent number of start of segment.
    pvseg_size           - Number of extents in segment.

  Unrecognised field: fred
Segmentation fault
WHATS_NEW
lib/report/report.c
This page took 0.040874 seconds and 5 git commands to generate.