diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-23 11:27:54 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-23 11:27:54 +0100 |
commit | a114a32c90fb4a3d249de760869cd57d750dff90 (patch) | |
tree | 8372279662ba9ceacde77684de7067a05d51ed27 /tools/console | |
parent | 9712f3511823176370ef88a5c0a6c8fdbbf45c36 (diff) | |
download | xen-a114a32c90fb4a3d249de760869cd57d750dff90.tar.gz xen-a114a32c90fb4a3d249de760869cd57d750dff90.tar.bz2 xen-a114a32c90fb4a3d249de760869cd57d750dff90.zip |
xenconsoled: fix timestamp log
timestamp log is broken.
Also, xenconsoled might die with segfault.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/daemon/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 11e0950595..67fb22c612 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -127,7 +127,7 @@ static int write_with_timestamp(int fd, const char *data, size_t sz, const char *last_byte = data + sz - 1; while (data <= last_byte) { - const char *nl = memchr(data, '\n', sz); + const char *nl = memchr(data, '\n', last_byte + 1 - data); int found_nl = (nl != NULL); if (!found_nl) nl = last_byte; |