summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/fileio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 2d83378b3d..6507f56606 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -116,6 +116,8 @@ ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
if (n > 0) {
readret = fsp->conn->vfs_ops.read(fsp->fd,data,n);
+ if (readret == -1)
+ return -1;
if (readret > 0) ret += readret;
}