mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
minor : Fixed ntfs_fuse_read() returning garbage in error case (Fabian Keil)
This commit is contained in:
parent
fa3d7a5728
commit
9497aa7974
@ -1262,8 +1262,10 @@ static void ntfs_fuse_read(fuse_req_t req, fuse_ino_t ino, size_t size,
|
|||||||
s64 total = 0;
|
s64 total = 0;
|
||||||
s64 max_read;
|
s64 max_read;
|
||||||
|
|
||||||
if (!size)
|
if (!size) {
|
||||||
|
res = 0;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
}
|
||||||
buf = (char*)ntfs_malloc(size);
|
buf = (char*)ntfs_malloc(size);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
|
Loading…
Reference in New Issue
Block a user