[PATCH] Improve NNTPconnect error reporting

Ian Jackson ijackson at chiark.greenend.org.uk
Mon Jun 7 10:52:19 UTC 2010


Russ Allbery writes ("Re: [PATCH] Improve NNTPconnect error reporting"):
> A string buffer seems to be about the right level of complexity, at
> least.  The only thing that makes me leery of it is that there's no good
> way to size that buffer; one just has to take a guess at what would be big
> enough.

Yes.  But OTOH the whole thing is already full of fixed-size buffers
so we wouldn't be making it much worse :-).

> On UNIX, you can probably get away with passing in a char ** and
> allocating the error buffer on the fly, but I'd rather not go that route
> just in case the INN version of this code is ever reunified with the
> version that I use on other projects, since that breaks on Windows without
> adding a corresponding function to free the error buffer.

That would be acceptable I guess.  But are we allowed to use asprintf ?
If not then printing into an allocated buffer is going to be such a
pain we'd probably rather not.

Ian.
(writing without the source to hand)



More information about the inn-workers mailing list