[INN] #125: QIO cannot deal with unlimited line lengths (useful for overchan)

INN rra at stanford.edu
Sat Jan 17 09:39:30 UTC 2009


#125: QIO cannot deal with unlimited line lengths (useful for overchan)
--------------------+-------------------------------------------------------
 Reporter:  iulius  |       Owner:  eagle
     Type:  defect  |      Status:  new  
 Priority:  low     |   Milestone:       
Component:  lib     |     Version:       
 Severity:  minor   |    Keywords:       
--------------------+-------------------------------------------------------
 Russ Allbery wrote in an [https://lists.isc.org/pipermail/inn-
 workers/2009-January/016487.html inn-workers posting]:

 > The Second issue I suspect might be a problem with the overview and I
 might have to rebuild the overview database.   Occasionally,  I get a
 notice in the errlog:
 > Jan  7 21:09:25 gondor overchan![12472]: input line too long, skipping

 overchan uses QIO, which means that it can't handle lines longer than 8192
 bytes (or st_blksize, but that only applies to reading files from disk).
 Extremely long References headers can cause the overview information for a
 single article to be longer than that, as can adding a lot of additional
 headers to overview.  It's a bug in overchan or in QIO.

 The problem from the QIO perspective is that you don't want to allow
 unlimited line lengths since you can then just run yourself out of memory
 if you're trying to read some mangled file (and QIO is used all over INN).
 overchan should probably just handle arbitrary input lines.

 I suspect we need to make QIO a bit more sophisticated by adding a
 parameter to QIOopen specifying the maximum line length, with 0 meaning
 unlimited, and then have QIO use buffer_* under the hood instead of
 rolling its own buffer implementation.  Then buffer_read will do useful
 things for you.

 Thankfully, we already have a unit test suite for QIO, so it should be
 possible to do that sort of refactoring and be relatively confident we
 didn't break anything.

-- 
Ticket URL: <http://inn.eyrie.org/trac/ticket/125>
INN <http://www.eyrie.org/~eagle/software/inn/>
InterNetNews


More information about the inn-bugs mailing list