INN commit: trunk/frontends (mailpost.in)
INN Commit
Russ_Allbery at isc.org
Fri Feb 27 18:50:54 UTC 2009
Date: Friday, February 27, 2009 @ 10:50:53
Author: iulius
Revision: 8358
* Fix *again* an uninitialized variable (when the body of the article
is empty).
* When an article contained CRLF, parsing was broken.
Modified:
trunk/frontends/mailpost.in
-------------+
mailpost.in | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Modified: mailpost.in
===================================================================
--- mailpost.in 2009-02-27 17:56:00 UTC (rev 8357)
+++ mailpost.in 2009-02-27 18:50:53 UTC (rev 8358)
@@ -156,7 +156,8 @@
}
}
-chomp $_;
+# Remove (CR)LF at the end of each line.
+s/\r?\n$//;
my $line = undef;
if (/^From\s+([^\s]+)\s+/) {
@@ -176,7 +177,8 @@
$_ = <STDIN> ;
last unless defined $_ ;
- chomp ;
+ # Remove (CR)LF at the end of each line.
+ s/\r?\n$//;
# Gather up a single header with possible continuation lines into $line.
if (/^\s+/) {
@@ -441,7 +443,8 @@
}
for (;;) {
$_ = <TMPFILE> ;
- chomp ;
+ # Remove (CR)LF at the end of each line.
+ s/\r?\n$//;
last if defined($_) && /^$/ ;
if (/^Newsgroups:\s*/sio) {
@@ -452,7 +455,7 @@
}
printf TMPFILE2 "\n" ;
- my $rest;
+ my $rest = '';
$rest .= $_ while (<TMPFILE>);
$rest =~ s/\n*$/\n/g; # Remove trailing \n except very last.
More information about the inn-committers
mailing list