From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 14 Dec 2010 17:34:05 +0200 From: Johan Hedberg To: Lukasz Pawlik Cc: linux-bluetooth@vger.kernel.org Subject: Re: [PATCH] Fix crash while reading from mapped file Message-ID: <20101214153405.GA11741@jh-x301> References: <1291989348-3911-1-git-send-email-michalski.raf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Lukasz, On Tue, Dec 14, 2010, Lukasz Pawlik wrote: > > I also wonder why we didn't use g_strsplit for this, it seems it would > > actually do the same, there is a little performance impact since we > > would have to iterate on the vector generated to call the callback > > while the current code do it in-place. > > Marcel, Johan any thoughts about this ? Should we reimplement this > code using glib functions ? It'd be nice to get some comments from Marcel since he is the original author of the textfile.c code. In general I'm not too happy about having to allocate a duplicate amount of memory for this (which is completely dependent on the file size), but I do agree that some fix is needed. I'd also like to make sure that we get a fix upstream before the next BlueZ release. Johan