From 9497aa7974b43ec5568f69590edb9b25809d497d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 4 Aug 2011 15:49:35 +0200 Subject: [PATCH] minor : Fixed ntfs_fuse_read() returning garbage in error case (Fabian Keil) --- src/lowntfs-3g.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 578aac49..63b1b88b 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -1262,8 +1262,10 @@ static void ntfs_fuse_read(fuse_req_t req, fuse_ino_t ino, size_t size, s64 total = 0; s64 max_read; - if (!size) + if (!size) { + res = 0; goto exit; + } buf = (char*)ntfs_malloc(size); if (!buf) { res = -errno;