diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-18 14:54:57 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-18 14:54:57 +0000 |
commit | d14c8604653d39dd25736279d34930ee7a3ae103 (patch) | |
tree | 626f700b9b42b798ed7459a5cba5cd27aca9753e /source3/libsmb | |
parent | 0c0b9c738f0fc1bf8aa64533a5e4e0635b84f58f (diff) | |
parent | fc31f2c5269fd405be96b9a036baf35a60141ccf (diff) | |
download | samba-d14c8604653d39dd25736279d34930ee7a3ae103.tar.gz samba-d14c8604653d39dd25736279d34930ee7a3ae103.tar.bz2 samba-d14c8604653d39dd25736279d34930ee7a3ae103.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into pyregistry
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clilist.c | 9 | ||||
-rw-r--r-- | source3/libsmb/libsmb_xattr.c | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index cebafc6919..1431b804b0 100644 --- a/source3/libsmb/clilist.c +++ b/source3/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; } diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c index ea2c46953c..4983018911 100644 --- a/source3/libsmb/libsmb_xattr.c +++ b/source3/libsmb/libsmb_xattr.c @@ -199,12 +199,13 @@ convert_sid_to_string(struct cli_state *ipc_cli, return; } - TALLOC_FREE(ctx); /* Converted OK */ slprintf(str, sizeof(fstring) - 1, "%s%s%s", domains[0], lp_winbind_separator(), names[0]); + + TALLOC_FREE(ctx); } /* convert a string to a SID, either numeric or username/group */ |