diff options
| author | Peter Maydell | 2014-03-08 13:38:43 +0100 |
|---|---|---|
| committer | Peter Maydell | 2014-03-08 13:38:43 +0100 |
| commit | f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71 (patch) | |
| tree | 1fda6a6482b69da84db90e151c3250a7fd9c7482 /fsdev/virtfs-proxy-helper.c | |
| parent | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (diff) | |
| parent | hw/9pfs: Include virtio-9p-device.o in build (diff) | |
| download | qemu-f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71.tar.gz qemu-f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71.tar.xz qemu-f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71.zip | |
Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging
* remotes/kvaneesh/for-upstream:
hw/9pfs: Include virtio-9p-device.o in build
hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation
hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()
hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:"
fsdev: Fix overrun after readlink() fills buffer completely
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'fsdev/virtfs-proxy-helper.c')
| -rw-r--r-- | fsdev/virtfs-proxy-helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 713a7b2b87..bfecb8706c 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -595,7 +595,7 @@ static int do_readlink(struct iovec *iovec, struct iovec *out_iovec) } buffer = g_malloc(size); v9fs_string_init(&target); - retval = readlink(path.data, buffer, size); + retval = readlink(path.data, buffer, size - 1); if (retval > 0) { buffer[retval] = '\0'; v9fs_string_sprintf(&target, "%s", buffer); |
