From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20251 invoked by alias); 23 Mar 2012 09:43:45 -0000 Received: (qmail 20233 invoked by uid 9737); 23 Mar 2012 09:43:44 -0000 Date: Fri, 23 Mar 2012 09:43:00 -0000 Message-ID: <20120323094344.20231.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/daemons/clvmd clvmd.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-03/txt/msg00135.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-03-23 09:43:44 Modified files: daemons/clvmd : clvmd.c Log message: Make sure namelen fits into buffer allocated on stack Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.131&r2=1.132 --- LVM2/daemons/clvmd/clvmd.c 2012/03/01 21:14:43 1.131 +++ LVM2/daemons/clvmd/clvmd.c 2012/03/23 09:43:44 1.132 @@ -2323,6 +2323,9 @@ if (result != CS_OK) goto out; + if (namelen >= sizeof(buf)) + namelen = sizeof(buf) - 1; + buf[namelen] = '\0'; type = parse_cluster_interface(buf); DEBUGLOG("got interface type '%s' from confdb\n", buf);