-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix IMAP SCAN on selected mailbox crasher #4552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks fine on a code read, but can you please add a test to prove it (and to prevent us breaking it again in the future)? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @elliefm, code looks good but please add a test.
ddabf29
to
ba22b56
Compare
ba22b56
to
dd3a777
Compare
Actually, SCAN was broken worse than just the crasher. It always returned nothing due to a logic error in the ACL test. And then it returned EXISTS, RECENT, and FLAGS responses fro every mailbox that is scanned. All issues have been fixed and tested - SCAN with/without a previously SELECTed mailbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks
Signed-off-by: Robert Stepanek <[email protected]>
I fixed a memory leak in the new code and pushed an update. |
Signed-off-by: Robert Stepanek <[email protected]>
imapd.c: needs an open mailbox for index_scan(), imapd_index is released before every command is parsed, so we need to reopen the mailbox