Skip to content
Permalink
Browse files Browse the repository at this point in the history
mboxlist: fix uninitialised memory use where pattern is "Other Users"
  • Loading branch information
brong committed Aug 31, 2017
1 parent b7677eb commit 6bd3327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap/mboxlist.c
Expand Up @@ -2851,7 +2851,7 @@ static int mboxlist_do_find(struct find_rock *rock, const strarray_t *patterns)
if (len) len--; // trailing separator

if (!strncmp(rock->namespace->prefix[NAMESPACE_USER], commonpat, MIN(len, prefixlen))) {
if (prefixlen < len) {
if (prefixlen <= len) {
/* we match all users */
strlcpy(domainpat+domainlen, "user.", sizeof(domainpat)-domainlen);
}
Expand Down

1 comment on commit 6bd3327

@carnil
Copy link

@carnil carnil commented on 6bd3327 Sep 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.