From: Matthias A. <mat...@gm...> - 2011-05-04 02:08:45
|
Am 04.05.2011 01:14, schrieb Matthias Andree: > I will take your patch in spite of my concerns, and test it. Observations: - the patch makes an undocumented assumption that the buffer for a second call to gen_recv_split is always large enough to copy the remainder. If it isn't, you lose data. Doesn't happen in fetchmail now, but is a maintenance concern, so I'll add an assert() for now. - you don't guard the prefix length - I've added that. - you don't check if the data-to-be-cached fits into the rs structure - I've added that. - /** foo */ isn't a typo, but a marker for Doxygen so it actually looks at the comment for documentation, and extracts it. Also note the ordering of these comments versus the comma; alternatively you can write /**< foo */ to document the PREVIOUS argument in a prototype. My changes have been pushed out to the Git master branch, please check my two Fixup commits: commit 646f36e1c1369fd65c0d641cae48fa4425613462 Author: Matthias Andree <mat...@gm...> Date: Wed May 4 02:02:30 2011 +0200 Fixup: match prefix caseblind, add some guards, streamline phase handling. Add a few asserts to catch abuse, and use strlcpy/strlcat rather than snprintf because some implementations of the latter are unsuitable for detecting buffer exhaustion. M transact.c commit d7d43f53e1da9d5c57961ea26fefa609de1e30e7 Author: Matthias Andree <mat...@gm...> Date: Wed May 4 01:58:46 2011 +0200 Fixup: remove unused variables. M imap.c |