diff options
author | Matthew Daley <mattjd@gmail.com> | 2013-09-11 02:34:22 +1200 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-13 13:15:30 +0100 |
commit | ba033a204b022cd4a2a8fd2c836d874090cb78e9 (patch) | |
tree | 46bd82731ef53dffe9438f3631d5068f0f0e58dd /tools | |
parent | da89e7ef29c2e310e620d3ee05e86e9c164cf17b (diff) | |
download | xen-ba033a204b022cd4a2a8fd2c836d874090cb78e9.tar.gz xen-ba033a204b022cd4a2a8fd2c836d874090cb78e9.tar.bz2 xen-ba033a204b022cd4a2a8fd2c836d874090cb78e9.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/xenstore/xenstored_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenstore/xenstored_linux.c b/tools/xenstore/xenstored_linux.c index 5460ca5573..cf40213b3b 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; |