Skip to content

Commit

Permalink
lib: path-util: 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 Jan 30, 2017
1 parent f3370db commit 6c7b2d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/path-util.c
Expand Up @@ -102,7 +102,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 6c7b2d5

Please sign in to comment.