From f2b073b2c8814633cd8810214b650821f1dd6216 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 21 Aug 2002 20:10:51 +0000 Subject: Hopefully work around one uninitialized value and try to catch it --- Echolot/Storage/File.pm | 8 ++++++-- NEWS | 3 +++ 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 -# $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 -- cgit v1.2.3