diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-03-12 17:18:26 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2006-03-12 17:18:26 +0000 |
commit | 1bb167cfa091b3c0e7e952bc4a27441a1af36c41 (patch) | |
tree | 2ad966ad8982cdfd7754d362bd317541b34a9ce8 /source/libsmb | |
parent | 766857e0a1253d4d29806b7ceb73853176a5b739 (diff) | |
download | samba-1bb167cfa091b3c0e7e952bc4a27441a1af36c41.tar.gz samba-1bb167cfa091b3c0e7e952bc4a27441a1af36c41.tar.xz samba-1bb167cfa091b3c0e7e952bc4a27441a1af36c41.zip |
r14241: Fix Coverity bug # 146
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/libsmbclient.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 6b4ae9f4b70..15355016d0a 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/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) { |