From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 8/8] xenstored: fix possible, but unlikely, stack overflow Date: Tue, 10 Sep 2013 15:48:12 +0100 Message-ID: <522F312C.9020408@citrix.com> References: <1378823662-20803-1-git-send-email-mattjd@gmail.com> <1378823662-20803-9-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1378823662-20803-9-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matthew Daley Cc: Stefano Stabellini , Ian Jackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 10/09/13 15:34, Matthew Daley wrote: > ...when reading xenbus port from xenfs. > > Coverity-ID: 1055741 > Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper > --- > tools/xenstore/xenstored_linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/xenstore/xenstored_linux.c b/tools/xenstore/xenstored_linux.c > index 5460ca5..cf40213 100644 > --- a/tools/xenstore/xenstored_linux.c > +++ b/tools/xenstore/xenstored_linux.c > @@ -32,7 +32,7 @@ evtchn_port_t xenbus_evtchn(void) > if (fd == -1) > return -1; > > - rc = read(fd, str, sizeof(str)); > + rc = read(fd, str, sizeof(str) - 1); > if (rc == -1) > { > int err = errno;