Skip to content

Commit

Permalink
lib-sieve: util: realpath: Fixed assertion in path_normalize().
Browse files Browse the repository at this point in the history
The invariant was using the wrong variable for comparison, causing it to trigger
erraticly.
  • Loading branch information
stephanbosch committed Feb 5, 2018
1 parent a960252 commit 461da9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-sieve/util/realpath.c
Expand Up @@ -96,7 +96,7 @@ static int path_normalize(const char *path, bool resolve_links,
}

/* copy segment to normalized path */
i_assert(p + seglen < npath + asize);
i_assert((npath_pos + seglen) < (npath + asize));
(void)memmove(npath_pos, p, seglen);
npath_pos += seglen;
}
Expand Down

0 comments on commit 461da9c

Please sign in to comment.