NIL value can cause hard crash, depending what
the key is. For x-proxy-ttl, NIL will crash
on any system, x-originating-ip will crash on
some nss versions (e.g. centos 6.7).
Migitating factor here is that the NIL value is only
accepted from trusted network.
client_update_info(struct imap_client *client,
const char *key, const char *value)
{
+ /* do not try to process NIL value */
+ if (value == NULL)
+ return;
if (strcasecmp(key, "x-originating-ip") == 0) {
(void)net_addr2ip(value, &client->common.ip);
} else if (strcasecmp(key, "x-originating-port") == 0) {