diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 6b4ae9f4b7..15355016d0 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -1200,7 +1200,7 @@ smbc_read_ctx(SMBCCTX *context, * the call to cli_read() instead of file->offset fixes a problem * retrieving data at an offset greater than 4GB. */ - off_t offset = file->offset; + off_t offset; if (!context || !context->internal || !context->internal->_initialized) { @@ -1219,6 +1219,8 @@ smbc_read_ctx(SMBCCTX *context, } + offset = file->offset; + /* Check that the buffer exists ... */ if (buf == NULL) { |