svn commit: samba r14241 - branches/SAMBA_3_0/source/libsmb trunk/source/libsmb

vlendec at samba.org vlendec at samba.org
Sun Mar 12 17:18:27 GMT 2006


Author: vlendec
Date: 2006-03-12 17:18:26 +0000 (Sun, 12 Mar 2006)
New Revision: 14241

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14241

Log:
Fix Coverity bug # 146
Modified:
   branches/SAMBA_3_0/source/libsmb/libsmbclient.c
   trunk/source/libsmb/libsmbclient.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/libsmbclient.c	2006-03-12 13:36:08 UTC (rev 14240)
+++ branches/SAMBA_3_0/source/libsmb/libsmbclient.c	2006-03-12 17:18:26 UTC (rev 14241)
@@ -1200,7 +1200,7 @@
          * 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 @@
 
 	}
 
+	offset = file->offset;
+
 	/* Check that the buffer exists ... */
 
 	if (buf == NULL) {

Modified: trunk/source/libsmb/libsmbclient.c
===================================================================
--- trunk/source/libsmb/libsmbclient.c	2006-03-12 13:36:08 UTC (rev 14240)
+++ trunk/source/libsmb/libsmbclient.c	2006-03-12 17:18:26 UTC (rev 14241)
@@ -1200,7 +1200,7 @@
          * 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 @@
 
 	}
 
+	offset = file->offset;
+
 	/* Check that the buffer exists ... */
 
 	if (buf == NULL) {



More information about the samba-cvs mailing list