The branch, v3-2-test has been updated via 4a996476297963d4cb300b4d45c23e83a493c339 (commit) via d75905ad66e96d4967eb8780d3a980eccb796898 (commit) from 394f4509bc5dd31801ef83ee9cc29c1e3a9f1078 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log ----------------------------------------------------------------- commit 4a996476297963d4cb300b4d45c23e83a493c339 Author: Volker Lendecke <[EMAIL PROTECTED]> Date: Sun Jun 22 13:06:35 2008 +0200 Fix a crash in _dfs_Enum commit d75905ad66e96d4967eb8780d3a980eccb796898 Author: Volker Lendecke <[EMAIL PROTECTED]> Date: Sun Jun 22 12:50:30 2008 +0200 Fix an uninitialized variable access in callers of parse_msdfs_symlink At least form_junctions() does not initialize refcount, and I don't see it in get_referred_path(). For the latters, the callers might initialize it. But even if they did, I think parse_msdfs_symlink() should unconditionally return the number of referrals it found. I don't think it makes sense to count them up from somewhere else. ----------------------------------------------------------------------- Summary of changes: source/include/msdfs.h | 2 +- source/smbd/msdfs.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/include/msdfs.h b/source/include/msdfs.h index 49b3ad4..4551325 100644 --- a/source/include/msdfs.h +++ b/source/include/msdfs.h @@ -52,7 +52,7 @@ struct referral { struct junction_map { char *service_name; char *volume_name; - char *comment; + const char *comment; int referral_count; struct referral* referral_list; }; diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c index 6fb523f..baf41bd 100644 --- a/source/smbd/msdfs.c +++ b/source/smbd/msdfs.c @@ -367,9 +367,10 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx, reflist[i].ttl = REFERRAL_TTL; DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n", reflist[i].alternate_path)); - *refcount += 1; } + *refcount = count; + TALLOC_FREE(alt_path); return True; } @@ -1501,6 +1502,7 @@ static int form_junctions(TALLOC_CTX *ctx, if (!jucn[cnt].service_name || !jucn[cnt].volume_name) { goto out; } + jucn[cnt].comment = ""; jucn[cnt].referral_count = 1; ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral); @@ -1560,6 +1562,7 @@ static int form_junctions(TALLOC_CTX *ctx, !jucn[cnt].volume_name) { goto out; } + jucn[cnt].comment = ""; cnt++; } } -- Samba Shared Repository