aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xs_lib.c
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-08-08 09:13:19 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-08-08 09:13:19 +0000
commit0996bc07b90b939292c1ae6baa0bd108675d0ba4 (patch)
treea83c7841d98a0484965d2d435eb914385ada7140 /tools/xenstore/xs_lib.c
parent9174fdfbfc3a340b4002d8eb71390d4cc203f1d6 (diff)
downloadxen-0996bc07b90b939292c1ae6baa0bd108675d0ba4.tar.gz
xen-0996bc07b90b939292c1ae6baa0bd108675d0ba4.tar.bz2
xen-0996bc07b90b939292c1ae6baa0bd108675d0ba4.zip
1) More testing: include tests which I forgot in previous patch, remove
xs_watch_stress, reduce cycles in "make check" random test. 2) xs_crashme: corrupt random packets going to xenstored, watch it crash. 3) Handle second input from before we finished output on first one. 4) Fix bug where one-arg operations are given zero args. 5) Fix bug where SET_PERMS fails after blocking on transaction. 6) Fix memory leak when DIRECTORY op given no argument. 7) Fail on first memory leak, for better testing. 8) Fix missing waiting_for_ack initialization for new connections. 9) Ensure all input and output is handled for domains so we don't stall. 10) Fix overrun bug in xs_count_strings on non-nul-terminated strings. 11) New test for clients which write without waiting for response. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/xenstore/xs_lib.c')
-rw-r--r--tools/xenstore/xs_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/xenstore/xs_lib.c b/tools/xenstore/xs_lib.c
index 1dd36e3e33..629eca5948 100644
--- a/tools/xenstore/xs_lib.c
+++ b/tools/xenstore/xs_lib.c
@@ -152,8 +152,9 @@ unsigned int xs_count_strings(const char *strings, unsigned int len)
unsigned int num;
const char *p;
- for (p = strings, num = 0; p < strings + len; p += strlen(p) + 1)
- num++;
+ for (p = strings, num = 0; p < strings + len; p++)
+ if (*p == '\0')
+ num++;
return num;
}