From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 279FE1F51F; Thu, 29 Sep 2022 17:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1664473832; bh=Ua7Qd4We93AdhoTkhxqPB+D6YFtSofME4GzcIGYtT/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j+CMFuEs09P7cxwA++R6+isZSkVHoM+RXU3SkOItQPuoHLWYa/gAwtYuo1pGJyQWF NshDnSW2zsLZ55xTwatLZOdYcICNpPZbF0p6UTePbUx6x70ELGoH25dr0gbneq3DFD MZitNYXd1J1VnscPPPhIZ0IWp7yScYuA2LdngDiA= From: Eric Wong To: meta@public-inbox.org Cc: Konstantin Ryabitsev Subject: [PATCH 1/4] syscall: initialize buffer for vec() Date: Thu, 29 Sep 2022 17:48:28 +0000 Message-Id: <20220929174831.2919939-2-e@80x24.org> In-Reply-To: <20220929174831.2919939-1-e@80x24.org> References: <20220929174831.2919939-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This is needed for older Perls (tested perl 5.16.3 on CentOS 7). --- lib/PublicInbox/Syscall.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Syscall.pm b/lib/PublicInbox/Syscall.pm index 46496bca..412ca64f 100644 --- a/lib/PublicInbox/Syscall.pm +++ b/lib/PublicInbox/Syscall.pm @@ -454,7 +454,7 @@ no warnings 'once'; *recv_cmd4 = sub ($$$) { my ($sock, undef, $len) = @_; - vec($_[1], ($len + 1) * 8, 1) = 0; + vec($_[1] //= '', ($len + 1) * 8, 1) = 0; my $cmsghdr = "\0" x msg_controllen; # 10 * sizeof(int) my $iov = pack('P'.TMPL_size_t, $_[1], $len); my $mh = pack('PL' . # msg_name, msg_namelen (socklen_t (U32))