From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 4/7] kvmtool: check strncpy return value Date: Tue, 8 Nov 2016 02:10:01 +0000 Message-ID: <20161108021001.GW20591@arm.com> References: <1476806576-9825-1-git-send-email-gcampana+kvm@quarkslab.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, andre.przywara@arm.com To: "G. Campana" Return-path: Received: from foss.arm.com ([217.140.101.70]:49600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbcKHCJ7 (ORCPT ); Mon, 7 Nov 2016 21:09:59 -0500 Content-Disposition: inline In-Reply-To: <1476806576-9825-1-git-send-email-gcampana+kvm@quarkslab.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Oct 18, 2016 at 06:02:56PM +0200, G. Campana wrote: > --- > virtio/9p.c | 28 +++++++++++++++++++++++----- > 1 file changed, 23 insertions(+), 5 deletions(-) > > diff --git a/virtio/9p.c b/virtio/9p.c > index cd93d06..87a579f 100644 > --- a/virtio/9p.c > +++ b/virtio/9p.c > @@ -424,7 +424,11 @@ static void virtio_p9_walk(struct p9_dev *p9dev, > if (nwname) { > struct p9_fid *fid = get_fid(p9dev, fid_val); > > - join_path(new_fid, fid->path); > + if (join_path(new_fid, fid->path) != 0) { > + errno = ENAMETOOLONG; > + goto err_out; > + } This patch should be merged in with the introduction of join_path. Will