You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/05/25 21:25:24 UTC
svn commit: r409439 - /spamassassin/trunk/sa-update.raw
Author: felicity
Date: Thu May 25 12:25:23 2006
New Revision: 409439
URL: http://svn.apache.org/viewvc?rev=409439&view=rev
Log:
check for errors off of secure_tmpfile in sa-update
Modified:
spamassassin/trunk/sa-update.raw
Modified: spamassassin/trunk/sa-update.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?rev=409439&r1=409438&r2=409439&view=diff
==============================================================================
--- spamassassin/trunk/sa-update.raw (original)
+++ spamassassin/trunk/sa-update.raw Thu May 25 12:25:23 2006
@@ -314,10 +314,16 @@
# Generate a temporary file to put channel content in for later use ...
my ($content_file, $tfh) = Mail::SpamAssassin::Util::secure_tmpfile();
+if ( !defined $content_file ) {
+ die "fatal: could not create temporary channel content file: $!\n";
+}
close($tfh);
# and another, for the new config file
my ($newcf_file, $tfh2) = Mail::SpamAssassin::Util::secure_tmpfile();
+if ( !defined $newcf_file ) {
+ die "fatal: could not create temporary channel content file: $!\n";
+}
close($tfh2);
# by default, exit code is 1, to indicate no updates occurred
@@ -547,6 +553,9 @@
dbg("gpg: populating temp signature file");
my $sig_file;
($sig_file, $tfh) = Mail::SpamAssassin::Util::secure_tmpfile();
+ if ( !defined $sig_file ) {
+ die "fatal: couldn't create temp file for GPG signature: $!\n";
+ }
binmode $tfh;
print $tfh $GPG;
close($tfh);