[0/5,v2] kvmtool: 9p: fix regression introduced by previous patch
diff mbox

Message ID 1479725288-12020-1-git-send-email-gcampana+kvm@quarkslab.com
State New
Headers show

Commit Message

G. Campana Nov. 21, 2016, 10:48 a.m. UTC
Signed-off-by: G. Campana <gcampana+kvm@quarkslab.com>
---
 virtio/9p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

diff --git a/virtio/9p.c b/virtio/9p.c
index 337bf75..7185bb7 100644
--- a/virtio/9p.c
+++ b/virtio/9p.c
@@ -250,7 +250,7 @@  static int get_full_path_helper(char *full_path, size_t size,
 	int ret;
 
 	ret = snprintf(full_path, size, "%s/%s", dirname, name);
-	if (ret >= (int)sizeof(full_path)) {
+	if (ret >= (int)size) {
 		errno = ENAMETOOLONG;
 		return -1;
 	}