1
0
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:
Volker Lendecke 2006-06-13 19:40:28 +00:00 committed by Gerald (Jerry) Carter
parent 319f80bbf0
commit 4cb8cf221f

View File

@ -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++;
}