mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xenstored: fix possible, but unlikely, stack overflow
...when reading xenbus port from xenfs. Coverity-ID: 1055741 Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
da89e7ef29
commit
ba033a204b
1 file changed
+1
-1
@@ -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;
|
||||
|
||||