When I was trying to regenerate history file for broken (after system carsh) timecaf spool (to dump valid articles left using "sm") makehistory crashed. makehistory is usually used after some spool problems so IMHO it should be more fail-proof. The attached patch fixes timecaf storage driver so it doesn't crash on some broken archives. This worked for me and should not be harmfull for anyone else. Similar improvements could be done for other storage methods. Greets, Jacek -- Attached file included as plaintext by Ecartis -- diff -dur inn-2.4.1.orig/storage/timecaf/caf.c inn-2.4.1/storage/timecaf/caf.c --- inn-2.4.1.orig/storage/timecaf/caf.c 2004-01-07 23:47:19.000000000 +0100 +++ inn-2.4.1/storage/timecaf/caf.c 2004-02-06 12:01:10.927721888 +0100 @@ -550,6 +550,7 @@ CAFHEADER head; int fd; CAFTOCENT tocent; + struct stat st; if ( (fd = open(path, O_RDONLY)) < 0) { /* @@ -595,6 +596,14 @@ return -1; } + fstat(fd,&st); + if ((long)tocent.Size>((long)st.st_size-(long)tocent.Offset)) { + fprintf(stderr,"Oversized article detected! broken spool?\n"); + CAFError(CAF_ERR_IO); + close(fd); + return -1; + } + *len = tocent.Size; return fd; } Only in inn-2.4.1/storage/timecaf: caf.c~