Message ID | 20230406205050.19428-1-stokito@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Petr Štetiar |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HuecCdny; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UKX0sJG8; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pstz76hsjz1yYy for <incoming@patchwork.ozlabs.org>; Fri, 7 Apr 2023 06:54:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d6Q0uwSM7HZdx1JVEDDx2Om9vckSFVkDDqTbm7iO7D4=; b=HuecCdnyeaPTFr MA2djH2T8mKDOg7sES4OjFn5L3cEdEtw4W5U1nzD/v+FDjKLkzotgaikKiSp6zpxr94ArQq0KI+9F EZg0H14goVdFVK2N1PrnnqXWD5Pu/dc8jZrFw+SIsGsH1B8NQqEoVb4fciidyhASEYgw4TuJtE+vn LqnbHDg1nJk1tLkYQ50t/FdB5J9A3yvTiQxzjzT6LhJoubBgqAWRkiqkemwjoeHkNMSvfGKZHRhRg PobqqCrc9f+J5Wf301aOW4/n54AuvYJbTHaBNY8UXdit3SEUBq88C5zaXP77i5zLRKrZQVxbEq/mh ySKRfiTc7MDkwQCaTATA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkWaH-008aIg-11; Thu, 06 Apr 2023 20:51:53 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkWaD-008aIL-2l for openwrt-devel@lists.openwrt.org; Thu, 06 Apr 2023 20:51:51 +0000 Received: by mail-ej1-x636.google.com with SMTP id l15so4321914ejq.10 for <openwrt-devel@lists.openwrt.org>; Thu, 06 Apr 2023 13:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680814307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lsKRogwIWsPPV5DH2gilURXEjMag6TuzZzkXANZiiNo=; b=UKX0sJG8iQyjcyd8UTTqYXgAzbmpILbfcQbjNHrmXjMGACkNwyNIMEtDk1TEDBi+5y /qjpCAH4zCU42wjIJMuBdjFnOmq7PgfufnPAzDCjLP/HExrtlJ3oSyLCzOCjEfLVAjPJ 0abEiaYVDlwlbTVSzehYjzUC8BlxhMkJWNLMQBG5IZsfUVbw+fPoIx68t2KFZg/v3xAX 0JRTouJcv9vUwqobZHuxkP2Y+TtfeIMKqVMCs1BB+PiyOuq1XGPDiTwJZH60a7j1/ZZ5 wC9/R7RJKhi7UTFi9q4p+WBtqxX5dJ3ougjla7bj2AA9jLuDHyNOWj6GqkjxrScoCRcy Hkog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680814307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lsKRogwIWsPPV5DH2gilURXEjMag6TuzZzkXANZiiNo=; b=hCUyz5W+cb+4A+kxlcvRmuao1m/ZcHMCW7QYWQMWjBVSBBhMvp1IazadgMJy5HjcAH MRd4xq/6r+fh5UFVseYBZPmEu3ZIrcHvl7WDZrwGJAQ0bz+N+Rp6A6wmAqQL8hbmWXGK sUW6nmL8g0GjXynjbCros1qrM4tOPXs9MLdqgDH7Na2olFZXXd3EtepJqXOVRPisJWM3 bwXOI76SgCP2KFrg5EZGs11df98gRXsGtl8c1J+jDTsODt0eFAEgHNIKN2Z7C/G9acNm IPCEp5FPdVYy819TCCPbcptM+Li3EPzBUKYlXNFERtDPe24IjZdUwkw8CwPvA6j89vAt e6Fw== X-Gm-Message-State: AAQBX9ctYiz7y8p8ub2FCP+X6ycB6K69jPBH+ztrkBp5F5LA0AHotls7 EVIQSqMhXGKcr7MnzuGSqCes4yB2jFNHDg== X-Google-Smtp-Source: AKy350YFYaLoq8dIOD7vnjwc1OUvHD24HCpQo4MgD0ZgLDUaX7/jBACygXwESgV01aw1gF642g9sGg== X-Received: by 2002:a17:906:9155:b0:922:2ba3:2348 with SMTP id y21-20020a170906915500b009222ba32348mr313061ejw.7.1680814307168; Thu, 06 Apr 2023 13:51:47 -0700 (PDT) Received: from stokito-serv.lan ([46.118.82.50]) by smtp.gmail.com with ESMTPSA id gq20-20020a170906e25400b0093e6f40d124sm1226519ejb.139.2023.04.06.13.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:51:46 -0700 (PDT) From: Sergey Ponomarev <stokito@gmail.com> To: openwrt-devel@lists.openwrt.org Cc: Sergey Ponomarev <stokito@gmail.com>, =?utf-8?q?Petr_=C5=A0tetiar?= <ynezz@true.cz>, Andre Heider <a.heider@gmail.com> Subject: [PATCH 1/5] uclient-fetch: --header: handle alloc error Date: Thu, 6 Apr 2023 23:50:50 +0300 Message-Id: <20230406205050.19428-1-stokito@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220509215923.36255-1-stokito@gmail.com> References: <20220509215923.36255-1-stokito@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230406_135149_896684_01A3E17F X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Sergey Ponomarev --- uclient-fetch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uclient-fetch.c b/uclient-fetch.c index f9f0174..30440b3 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -650,6 +650,11 @@ int main(int argc, char **argv) Since the first arg is pro [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:636 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [stokito[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
[1/5] uclient-fetch: --header: handle alloc error
|
expand
|
diff --git a/uclient-fetch.c b/uclient-fetch.c index f9f0174..30440b3 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -650,6 +650,11 @@ int main(int argc, char **argv) Since the first arg is program and last is a URL. But user may forget the URL and raw_headers is null terminated so allocate argc */ raw_headers = calloc(argc, sizeof(char *)); + if (!raw_headers) { + if (!quiet) + fprintf(stderr, "Unable to allocate memory for headers\n"); + exit(1); + } } raw_headers[raw_headers_count] = optarg; raw_headers_count++;
Signed-off-by: Sergey Ponomarev <stokito@gmail.com> --- uclient-fetch.c | 5 +++++ 1 file changed, 5 insertions(+)