]> Sergey Matveev's repositories - public-inbox.git/commitdiff
nntp: avoid uninitialized variable from blank requests
authorEric Wong <e@80x24.org>
Wed, 8 May 2019 02:53:03 +0000 (02:53 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 May 2019 02:55:55 +0000 (02:55 +0000)
We'll ignore blank lines from clients, since that's what innd
seems to do.

lib/PublicInbox/NNTP.pm

index 13591e5d983c06af9606a1107e151aa201755ad6..e833157747041a923be927bc4043c286e03fea4b 100644 (file)
@@ -122,7 +122,7 @@ sub args_ok ($$) {
 sub process_line ($$) {
        my ($self, $l) = @_;
        my ($req, @args) = split(/\s+/, $l);
-       return unless defined($req);
+       return 1 unless defined($req); # skip blank line
        $req = lc($req);
        $req = eval {
                no strict 'refs';