[Dovecot] Segmentation fault when only use pop3

Tatsuyoshi rs27 at tatsuyoshi.net
Tue Mar 17 03:40:52 EET 2009


Hi.
I found the problem when only use POP3 at v1.1.12.

[root at kessel]# diff /usr/local/etc/dovecot-example.conf
/usr/local/etc/dovecot.conf
23a24
> protocols = pop3
47a49
> disable_plaintext_auth = no
88a91
> ssl_disable = yes

[root at kessel]# /usr/local/sbin/dovecot
Segmentation fault

Cause, call null-pointer's pointer.
The following is quick-hack patch,

[toyota at kessel]% diff -c master-settings.c.org master-settings.c
*** master-settings.c.org       2009-03-14 04:11:53.000000000 +0900
--- master-settings.c   2009-03-17 10:39:38.000000000 +0900
***************
*** 908,919 ****
  {
        const char *p;

!       p = strstr(set->server->pop3->login_executable, " -D");
!       if (p != NULL && p[3] == '\0')
!               return TRUE;
!       p = strstr(set->server->imap->login_executable, " -D");
!       if (p != NULL && p[3] == '\0')
!               return TRUE;
        return FALSE;
  }

--- 908,923 ----
  {
        const char *p;

!       if(set->server->pop3) {
!               p = strstr(set->server->pop3->login_executable, " -D");
!               if (p != NULL && p[3] == '\0')
!                       return TRUE;
!     }
!       if(set->server->imap) {
!               p = strstr(set->server->imap->login_executable, " -D");
!               if (p != NULL && p[3] == '\0')
!                       return TRUE;
!       }
        return FALSE;
  }


Regards.

--
Tatsuyoshi Toyota
rs27 at tatsuyoshi.net


More information about the dovecot mailing list