aboutsummaryrefslogtreecommitdiff
path: root/fsdev/9p-iov-marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fsdev/9p-iov-marshal.c')
-rw-r--r--fsdev/9p-iov-marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c
index 663cad5429..1d16f8df4b 100644
--- a/fsdev/9p-iov-marshal.c
+++ b/fsdev/9p-iov-marshal.c
@@ -125,7 +125,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
str->data = g_malloc(str->size + 1);
copied = v9fs_unpack(str->data, out_sg, out_num, offset,
str->size);
- if (copied > 0) {
+ if (copied >= 0) {
str->data[str->size] = 0;
} else {
v9fs_string_free(str);