--------------------- PatchSet 4145 Date: 2007/04/03 16:54:38 Author: rousskov Branch: squid3-icap Tag: (none) Log: FtpStateData::parseListing() could not handle an empty content buffer. The attached patch fixes that. I do not know whether an empty content buffer is an indication of a bigger problem eslewhere. Members: src/ftp.cc:1.29.2.13->1.29.2.14 Index: squid3/src/ftp.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ftp.cc,v retrieving revision 1.29.2.13 retrieving revision 1.29.2.14 diff -u -r1.29.2.13 -r1.29.2.14 --- squid3/src/ftp.cc 8 Mar 2007 22:09:35 -0000 1.29.2.13 +++ squid3/src/ftp.cc 3 Apr 2007 16:54:38 -0000 1.29.2.14 @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.29.2.13 2007/03/08 22:09:35 rousskov Exp $ + * $Id: ftp.cc,v 1.29.2.14 2007/04/03 16:54:38 rousskov Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1106,6 +1106,12 @@ size_t usable; StoreEntry *e = entry; size_t len = data.readBuf->contentSize(); + + if (!len) { + debug(9, 3) ("ftpParseListing: no content to parse for %s\n", storeUrl(e)); + return; + } + /* * We need a NULL-terminated buffer for scanning, ick */