mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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 7317211348
)
This commit is contained in:
parent
a8ae3bc317
commit
62f69165f6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user