[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8/8] xenstored: fix possible, but unlikely, stack overflow



On 10/09/13 15:34, Matthew Daley wrote:
> ...when reading xenbus port from xenfs.
>
> Coverity-ID: 1055741
> Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

> ---
>  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;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.