On Mon, 17 Mar 2003, Christoph Hohmann wrote:
>Hi,
>I was searching for a new IMAP server because courier-imap
>is unusable. Then I found your project, but unfortunately
>the imap server crashes with a segmentation fault in
>imapparser.cc in BincImapParserSet::isInSet when the command
>"UID SEARCH UID 1:*" is executed.
>I hope you can fix this, because I found no other imap
>server that supports maildir.
I found it, and here's a patch from 1.0.25 that fixes this bug. Might also
work fine with earlier versions because the search code has been pretty
much untouched for quite a while:
diff -u -r1.18 bincimapd-search.cc
--- src/bincimapd-search.cc 7 Mar 2003 07:40:37 -0000 1.18
+++ src/bincimapd-search.cc 17 Mar 2003 07:38:58 -0000
@@ -949,8 +949,11 @@
else if (a.name == "SENTON") { type = S_SENTON; weight = 1; }
else if (a.name == "SENTSINCE") { type = S_SENTSINCE; weight = 1; }
else if (a.name == "SMALLER") { type = S_SMALLER; weight = 4; }
- else if (a.name == "UID") { type = S_UID; weight = 1; }
- else if (a.name == "UNDRAFT") { type = S_UNDRAFT; weight = 1; }
+ else if (a.name == "UID") {
+ bset = &a.getSet();
+ type = S_UID;
+ weight = 1;
+ } else if (a.name == "UNDRAFT") { type = S_UNDRAFT; weight = 1; }
else if (a.type == BincImapParserSearchKey::KEY_SET) {
bset = &a.getSet();
type = S_SET;