If a buggy backend IMAP server sends "* MULTIPLEX 0" twice, the second
parse call re-entered login_proxy_multiplex_input_start() and crashed
on the multiplex_orig_input==NULL assert. Detect the duplicate and
fail the proxy connection with a protocol error instead.
"MULTIPLEX started without being requested");
return -1;
}
+ if (login_proxy_multiplex_input_started(client->login_proxy)) {
+ login_proxy_failed(client->login_proxy,
+ login_proxy_get_event(client->login_proxy),
+ LOGIN_PROXY_FAILURE_TYPE_PROTOCOL,
+ "MULTIPLEX started twice");
+ return -1;
+ }
login_proxy_multiplex_input_start(client->login_proxy);
/* force caller to refresh istream */
return 1;