mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r16203: Fix potentially writing one result of strtok beyond the end of alt_path.
Found by Klocwork, ID 653. Volker
This commit is contained in:
parent
319f80bbf0
commit
4cb8cf221f
@ -203,7 +203,8 @@ static BOOL parse_symlink(TALLOC_CTX *ctx, char *buf, struct referral **preflist
|
||||
}
|
||||
|
||||
/* parse out the alternate paths */
|
||||
while(((alt_path[count] = strtok(NULL,",")) != NULL) && count<MAX_REFERRAL_COUNT) {
|
||||
while((count<MAX_REFERRAL_COUNT) &&
|
||||
((alt_path[count] = strtok(NULL,",")) != NULL)) {
|
||||
count++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user