Message ID | 20191219221125.22646-6-ynezz@true.cz |
---|---|
State | Accepted |
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@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nbWSdtgV"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47f5jW0CHgz9sPJ for <incoming@patchwork.ozlabs.org>; Fri, 20 Dec 2019 09:13:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uSCqAA8+cMNuHMlFp6ieSITmxnenGkmM4f3kaYdcrBs=; b=nbWSdtgVjUHFq1 9WZM4NiY61yyporbhuWOrRQHUe4y91hxHqU667c/QTGuOQSLZDhex2ZLvH6dcA54XDxyV01ES3NAy lAY4rs4IJc3mgtiAuL8kkcuVVkv0+JzliY1xq+3CF3lXH8gIZmYeclS38Hgpx+XHPWlGicRCA2rvg 4+7mdHBiKDEQWj89pcT4uwySF/3G5pzBI6uRHkCfqFI5JLbxbkIT2W7hWDpDxQRap5bxhzE8BFN3b rBqreHleV9wU3l9Psgc+VyLI91HWb/xuAehrNY967hn/qbUX3GMbqgJcu02LxC5wCDgmxFSI+X5yP ja7geeAUAbPIws+yGggw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii42W-0006zy-8a; Thu, 19 Dec 2019 22:13:00 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii41J-000542-NT for openwrt-devel@lists.openwrt.org; Thu, 19 Dec 2019 22:11:47 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id BFD9C4BC0; Thu, 19 Dec 2019 23:11:43 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 6e2e93fe; Thu, 19 Dec 2019 23:11:33 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= <ynezz@true.cz> To: openwrt-devel@lists.openwrt.org Date: Thu, 19 Dec 2019 23:11:14 +0100 Message-Id: <20191219221125.22646-6-ynezz@true.cz> In-Reply-To: <20191219221125.22646-1-ynezz@true.cz> References: <20191219221125.22646-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191219_141145_936135_2E643108 X-CRM114-Status: UNSURE ( 8.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH ubus 05/16] libubus: fix incompatible pointer types assigment X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.infradead.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: <http://lists.infradead.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Cc: =?utf-8?q?Petr_=C5=A0tetiar?= <ynezz@true.cz> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
GitLab CI, tests, fuzzing, fixes and improvements
|
expand
|
diff --git a/libubus.c b/libubus.c index 260e40f2f44b..846ae83bcc12 100644 --- a/libubus.c +++ b/libubus.c @@ -283,7 +283,7 @@ int ubus_connect_ctx(struct ubus_context *ctx, const char *path) ctx->connection_lost = ubus_default_connection_lost; ctx->pending_timer.cb = ubus_process_pending_msg; - ctx->msgbuf.data = calloc(UBUS_MSG_CHUNK_SIZE, sizeof(char)); + ctx->msgbuf.data = calloc(1, UBUS_MSG_CHUNK_SIZE); if (!ctx->msgbuf.data) return -1; ctx->msgbuf_data_len = UBUS_MSG_CHUNK_SIZE;
Fixes following error reported by clang-9 analyzer: libubus.c:286:19: error: incompatible pointer types assigning to 'struct blob_attr *' from 'char *' [-Werror,-Wincompatible-pointer-types] ctx->msgbuf.data = (char *) calloc(UBUS_MSG_CHUNK_SIZE, sizeof(char)); Result of 'calloc' is converted to a pointer of type 'struct blob_attr', which is incompatible with sizeof operand type 'char'. Signed-off-by: Petr Štetiar <ynezz@true.cz> --- libubus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)