cyrusdb_flat.c and junk pointer free

Neal Rigney nrigney at flytechnology.com
Mon Sep 23 13:11:46 EDT 2002


If a user does an LSUB and configdir doesn't have their directory,
FreeBSD punts "Junk pointer, too high to make sense" to the imap socket,
causing every IMAP client I can test to fail.  The problem is that
db->fname is not initialized in myopen.  I haven't checked any other db
backends for the same issue.

Here's a patch:



Index: cyrusdb_flat.c
===================================================================
RCS file:
/vol/cvsroot/Systems/services/mail/imap/cyrus-imap-current/lib/cyrusdb_flat.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 cyrusdb_flat.c
*** cyrusdb_flat.c	15 Aug 2002 22:24:55 -0000	1.1.1.2
--- cyrusdb_flat.c	23 Sep 2002 17:15:16 -0000
***************
*** 188,193 ****
--- 188,194 ----
  
      assert(fname && ret);
  
+     db->fname = NULL;
      db->fd = open(fname, O_RDWR | O_CREAT, 0666);
      if (db->fd == -1) {
  	syslog(LOG_ERR, "IOERROR: opening %s: %m", fname);







More information about the Info-cyrus mailing list