|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 8/8] xenstored: fix possible, but unlikely, stack overflow
...when reading xenbus port from xenfs.
Coverity-ID: 1055741
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
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;
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |