From: Dan Magenheimer Subject: Re: [PATCH] tools: misc: xen-tmem-list-parse: fix output ugliness Date: Sat, 26 Nov 2011 08:11:32 -0800 (PST) Message-ID: References: <20171.55835.240381.351382@mariner.uk.xensource.com> <2b60cfe7-2c97-45ef-bf89-88cd01cff1d3@default 20174.36841.738985.984736@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20174.36841.738985.984736@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: xen-devel@lists.xensource.com, Konrad Wilk , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org > From: Ian Jackson [mailto:Ian.Jackson@eu.citrix.com] > Sent: Thursday, November 24, 2011 11:42 AM > To: Dan Magenheimer > Cc: xen-devel@lists.xensource.com; stefano.stabellini@eu.citrix.com > Subject: Re: [Xen-devel] [PATCH] tools: misc: xen-tmem-list-parse: fix output ugliness > > Dan Magenheimer writes ("Re: [Xen-devel] [PATCH] tools: misc: xen-tmem-list-pars> No, it doesn't. I > agree it *could* if parse_string is > > used/called differently. The caller simply needs to > > ensure that the declared buffer is at least one larger > > than the data to be matched which is true for both > > callers. > > Urgh. So in the previous code the buffer was a byte too big ? > > I think functions with prototypes like > f(int len, char *buf) > should take buf[len], not buf[len+1]. FWIW, I agree completely. I didn't write this code from scratch, I heavily leveraged it from elsewhere (don't recall exactly where, maybe xentop?). If necessary, I will rewrite the callers and API but I was just trying to fix an annoying bug expeditiously. Let me know if you won't accept it as the one-line ugly fix. > > P.S. Please note that I am still not receiving email > > >from the xen-devel reflector (and am on vacation this > > week so probably won't be looking into it... my best > > guess is that the Oracle spam filter isn't happy with > > the new source of the xen-devel messages, as some > > other Oracle folk are having problems too). > > Hrmm. If this is still a problem when you get back please let me know. Still a problem. Konrad filed an internal bug report (Oracle has an Exchange-like mail server that is eat- your-own-dog-food) but the US holiday weekend, which many turn into a whole week, means it's probably not even getting looked at yet by Oracle's IT group. It may be unrelated to the xen.org server change but the coincidence is suspicious. Interestingly, I got precisely one xen-devel email in the last week which is what led me to the spam filter theory... though I have gotten every xen-changelog email. Dan