From a12b2cd9e806fefeabdbe73b46b569f5b9bc927f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 May 2000 02:39:02 +0000 Subject: Fix for read_file() returning -1. Jeremy. (This used to be commit b899943658bee90994b416aa6caff0ee7cab5f28) --- source3/smbd/fileio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/smbd') 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; } -- cgit