From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29552 invoked by alias); 10 Feb 2012 14:00:13 -0000 Received: (qmail 29467 invoked by uid 9737); 10 Feb 2012 14:00:08 -0000 Date: Fri, 10 Feb 2012 14:00:00 -0000 Message-ID: <20120210140008.29465.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW_DM libdm/libdm-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: 2012-02/txt/msg00050.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-02-10 14:00:08 Modified files: . : WHATS_NEW_DM libdm : libdm-report.c Log message: Do not crash for NULL sort_key Guard against NULL pointer for sort_key and let it behave like an empty string would have been passed in (i.e. no key). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.545&r2=1.546 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-report.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47 --- LVM2/WHATS_NEW_DM 2012/02/10 13:56:19 1.545 +++ LVM2/WHATS_NEW_DM 2012/02/10 14:00:07 1.546 @@ -1,5 +1,6 @@ Version 1.02.70 - =================================== + Do not crash for dm_report_init() sort_key == NULL and behave like "". Return error for failing allocation in dm_asprintf(). Add missing test for failing allocation in dm_realloc() code. Add test for memory allocation failures in regex matcher code. --- LVM2/libdm/libdm-report.c 2011/08/04 14:30:52 1.46 +++ LVM2/libdm/libdm-report.c 2012/02/10 14:00:07 1.47 @@ -541,6 +541,9 @@ const char *ws; /* Word start */ const char *we = keys; /* Word end */ + if (!keys) + return 1; + while (*we) { /* Allow consecutive commas */ while (*we && *we == ',')