diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-03-12 17:18:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:19 -0500 |
commit | 784cc042cb245786516333ae53cfde8fc9502a23 (patch) | |
tree | 7455682e1a43d7ba056340502756a6b987e8aae2 /source3/libsmb/libsmbclient.c | |
parent | 6a8432833bb073c7fa91f9f4de1fe7a5cd8d0cec (diff) | |
download | samba-784cc042cb245786516333ae53cfde8fc9502a23.tar.gz samba-784cc042cb245786516333ae53cfde8fc9502a23.tar.xz samba-784cc042cb245786516333ae53cfde8fc9502a23.zip |
r14241: Fix Coverity bug # 146
(This used to be commit 97789ec8fc4ae2d31f6dd554d9979abce186eb30)
Diffstat (limited to 'source3/libsmb/libsmbclient.c')
-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 6b4ae9f4b70..15355016d0a 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) { |