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:
Matthew Daley authored and Ian Campbell committed 2013-09-13 13:15:30 +01:00
1 parent da89e7ef29
commit ba033a204b
1 file changed
+1 -1
+1 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.