On Thu, 27 Mar 2003, Charlie Brady wrote:
>1.1.1-1 segfault, when started like so:
>
>BINCIMAP_LOGIN=xx ./bincimapd
Nice catch. vector element 1 was accessed without checking that the size
of the vector was equal to or greater than 2. Here's an untested patch
that Should(tm) fix this problem:
diff -u -r1.44 bincimapd.cc
--- src/bincimapd.cc 27 Mar 2003 12:40:39 -0000 1.44
+++ src/bincimapd.cc 28 Mar 2003 07:18:38 -0000
@@ -323,6 +323,11 @@
string details = logindetails;
vector<string> det;
split(details, "+", det);
+ if (det.size() < 2) {
+ logger << "invalid content of BINCIMAP_LOGIN - did you invoke "
+ << argv[0] << " correctly?" << endl;
+ return 111;
+ }
try {
com << det[1] << " OK " << det[0] << " completed" << endl; com.flushContent();