From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11269 invoked by alias); 15 Dec 2008 13:30:48 -0000 Received: (qmail 10966 invoked by uid 9657); 15 Dec 2008 13:30:47 -0000 Date: Mon, 15 Dec 2008 13:30:00 -0000 Message-ID: <20081215133047.10964.qmail@sourceware.org> From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW lib/report/report.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00024.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2008-12-15 13:30:46 Modified files: . : WHATS_NEW lib/report : report.c Log message: 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 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1008&r2=1.1009 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91 --- LVM2/WHATS_NEW 2008/12/11 13:45:28 1.1008 +++ LVM2/WHATS_NEW 2008/12/15 13:30:45 1.1009 @@ -1,5 +1,6 @@ Version 2.02.44 - ==================================== + Fix segfault when invalid field given in reporting commands. Refactor init_lvm() for lvmcmdline and clvmd. Add liblvm interactive test infrastructure to build. Use better random seed value in temp file creation. --- LVM2/lib/report/report.c 2008/12/04 15:54:27 1.90 +++ LVM2/lib/report/report.c 2008/12/15 13:30:46 1.91 @@ -1108,7 +1108,7 @@ rh = dm_report_init(report_type, _report_types, _fields, format, separator, report_flags, keys, cmd); - if (field_prefixes) + if (rh && field_prefixes) dm_report_set_output_field_name_prefix(rh, "lvm2_"); return rh;