[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3285-gb1727bb

Jeremy Allison jra at samba.org
Tue Dec 16 21:44:00 GMT 2008


The branch, v3-2-test has been updated
       via  b1727bbc7416f1a752cb1aadaff718e66f4a4381 (commit)
      from  bfc4c75c340e3182b5a9572763fcf8c004ec2eed (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b1727bbc7416f1a752cb1aadaff718e66f4a4381
Author: Kai Blin <kai at samba.org>
Date:   Tue Dec 16 13:43:28 2008 -0800

    (Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NAS-BASIC server).

-----------------------------------------------------------------------

Summary of changes:
 source/libsmb/clilist.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clilist.c b/source/libsmb/clilist.c
index cebafc6..1431b80 100644
--- a/source/libsmb/clilist.c
+++ b/source/libsmb/clilist.c
@@ -79,16 +79,17 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
 			p += 27;
 			p += clistr_align_in(cli, p, 0);
 
-			/* We can safely use +1 here (which is required by OS/2)
-			 * instead of +2 as the STR_TERMINATE flag below is
+			/* We can safely use len here (which is required by OS/2)
+			 * and the NAS-BASIC server instead of +2 or +1 as the
+			 * STR_TERMINATE flag below is
 			 * actually used as the length calculation.
-			 * The len+2 is merely an upper bound.
+			 * The len is merely an upper bound.
 			 * Due to the explicit 2 byte null termination
 			 * in cli_receive_trans/cli_receive_nt_trans
 			 * we know this is safe. JRA + kukks
 			 */
 
-			if (p + len + 1 > pdata_end) {
+			if (p + len > pdata_end) {
 				return pdata_end - base;
 			}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list