summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-08-21 20:10:51 +0000
committerPeter Palfrader <peter@palfrader.org>2002-08-21 20:10:51 +0000
commitf2b073b2c8814633cd8810214b650821f1dd6216 (patch)
tree94d0ca085bccb5930b57b74bc2d63bb89dead9e9
parentc5e2563b7a463604c759c3e106b19e8ad3be4697 (diff)
Hopefully work around one uninitialized value and try to catch it
-rw-r--r--Echolot/Storage/File.pm8
-rw-r--r--NEWS3
2 files changed, 9 insertions, 2 deletions
diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm
index 4e90d1a..e6bfd02 100644
--- a/Echolot/Storage/File.pm
+++ b/Echolot/Storage/File.pm
@@ -1,7 +1,7 @@
package Echolot::Storage::File;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: File.pm,v 1.38 2002/07/16 02:59:17 weasel Exp $
+# $Id: File.pm,v 1.39 2002/08/21 20:10:51 weasel Exp $
#
=pod
@@ -731,6 +731,9 @@ sub set_caps($$$$$$;$) {
sub set_key($$$$$$$$$) {
my ($self, $type, $nick, $address, $key, $keyid, $version, $caps, $summary, $timestamp) = @_;
+
+ (defined $address) or
+ cluck ("$address not defined in set_key");
if (! defined $self->{'METADATA'}->{'remailers'}->{$address}) {
$self->{'METADATA'}->{'remailers'}->{$address} =
@@ -739,7 +742,8 @@ sub set_key($$$$$$$$$) {
};
} else {
$self->{'METADATA'}->{'remailers'}->{$address}->{'status'} = 'active'
- if ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'} eq 'expired');
+ if (!defined ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'}) ||
+ ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'} eq 'expired'));
};
if (! defined $self->{'METADATA'}->{'remailers'}->{$address}->{'keys'}) {
diff --git a/NEWS b/NEWS
index e38e832..40ce6b8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Changes in version
+ * Hunt uninitialized variables in File.pm: 741
+
Changes in version 2.0beta31 - 2002-08-21
* Have a consistent name for the ~/echolot directory in README.
* If you request keyconf from only a few remailers, more requests could