summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-22 12:50:30 +0200
committerVolker Lendecke <vl@samba.org>2008-06-22 13:07:51 +0200
commit62f69165f6b66e149055ba431a48aab1a67c4215 (patch)
treee07d3ae780f8019377665fb5d00a6067c1588c55
parenta8ae3bc317c9fb0c77798b361e54efff6cdb8a9b (diff)
downloadsamba-62f69165f6b66e149055ba431a48aab1a67c4215.tar.gz
samba-62f69165f6b66e149055ba431a48aab1a67c4215.tar.bz2
samba-62f69165f6b66e149055ba431a48aab1a67c4215.zip
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. (This used to be commit 73172113484a2c6c9af014f59e84707716c61a7d)
-rw-r--r--source3/smbd/msdfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 25b22f4cc0..bdcdc92df2 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -370,9 +370,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;
}