From 03c9d045f4276c340cf31cc130da8f4f1ecdd81a Mon Sep 17 00:00:00 2001 From: Daniel B Date: Sun, 15 May 2016 19:19:02 +0200 Subject: [PATCH] Check $addr is defined before using it (#266) Prevent the following error if we receive an invalid RCPT TO (eg <"relaytest%nmap.scanme.org">) Can't call method "qp" on an undefined value at /usr/share/perl5/vendor_perl/Qpsmtpd.pm line 451. /usr/bin/qpsmtpd-forkserver[17472]: command 'rcpt' failed unexpectedly --- lib/Qpsmtpd.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 928b3b6..6b6b624 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -448,7 +448,7 @@ sub auth_mechanism { sub address { my $self = shift; my $addr = Qpsmtpd::Address->new(@_); - $addr->qp($self); + $addr->qp($self) if $addr; return $addr; }