INN commit: trunk/innfeed (article.c)
INN Commit
rra at isc.org
Sun Jun 14 10:06:27 UTC 2015
Date: Sunday, June 14, 2015 @ 03:06:27
Author: iulius
Revision: 9894
innfeed: be more conservative about article read from disk
Thanks to Richard Kettlewell for the patch.
Modified:
trunk/innfeed/article.c
-----------+
article.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Modified: article.c
===================================================================
--- article.c 2015-06-14 10:05:50 UTC (rev 9893)
+++ article.c 2015-06-14 10:06:27 UTC (rev 9894)
@@ -668,7 +668,7 @@
article->contents = NULL ;
warn ("ME munged article %s", article->fname) ;
} else {
- if (p[-1] == '\r') {
+ if (p > buffer && p[-1] == '\r') {
article->inWireFormat = true ;
} else {
/* we need to copy the contents into a buffer below */
@@ -740,11 +740,9 @@
if ((p = strchr(buffer, '\n')) == NULL) {
article->articleOk = false;
warn ("ME munged article %s", article->fname) ;
- }
- else if (p[-1] == '\r') {
- article->inWireFormat = true ;
- }
- else {
+ } else if (p > buffer && p[-1] == '\r') {
+ article->inWireFormat = true ;
+ } else {
if ( nntpPrepareBuffer (article->contents) ) {
size_t diff =
(bufferDataSize (article->contents) - articlesize) ;
More information about the inn-committers
mailing list