From patchwork Wed Jun 29 05:02:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 641830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rfVtK5JWzz9sf9 for ; Wed, 29 Jun 2016 15:03:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=DSKsywTL; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 8961A1091E; Tue, 28 Jun 2016 22:02:49 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id B928D108F5 for ; Tue, 28 Jun 2016 22:02:44 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 46A611E04BD for ; Tue, 28 Jun 2016 23:02:44 -0600 (MDT) X-ASG-Debug-ID: 1467176563-09eadd73960e910001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id 36am3d6A464dDqae (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 28 Jun 2016 23:02:43 -0600 (MDT) X-Barracuda-Envelope-From: u9012063@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pf0-f196.google.com) (209.85.192.196) by mx1-pf1.cudamail.com with ESMTPS (AES128-SHA encrypted); 29 Jun 2016 05:02:43 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.192.196 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.192.196 X-Barracuda-RBL-IP: 209.85.192.196 Received: by mail-pf0-f196.google.com with SMTP id c74so3561593pfb.0 for ; Tue, 28 Jun 2016 22:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=sVqFMN7Cu9s10wzysfZgvpv5kZROamZGwm2sOFaiadY=; b=DSKsywTLISYco2vb7hrDQK11sr6d7RyM3OiLAKppSdJG9aHDHVU3V5Y6fA8LmBOV+m /Ja2XAN2n6deF/DtYu56zXF+28H80KomJpyEITkWUkBbuDNaMwVZpRzbPklMU77vvG5k Rvrh89vc2IUkVbSuLQIAYWuhWFRBSQhtCQ2GS8+dYsEPDmxCoIYjpBORtEqeP4GV62or wwcx4hF3aSFGkKCTl0J1pwfhnGxHayIM6K8/yqKEJgWhNGjCvFZNC7yeaX+P12Y9GEF+ WxMBfn6zuU7l0Ap5MzhYMQNQ89y/JXkZ4wZh/Kth3Cej6FjRWV0BDbicFo5dJsA8cmss 3Crg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=sVqFMN7Cu9s10wzysfZgvpv5kZROamZGwm2sOFaiadY=; b=ChlR/FE99BOgcIS9CiReSBmQPMx7ZUNkfMxS4Dg81Axd+mXnFYTcpx09Inhtb9GA/f vVsgPo2y+bCkIXRbi0YzKJWJUjZlHpM9f8ugDCKFOipYMVGC+zwcbojqsUWDYodhovn2 xgr6BvI76rQUpArv/2ohW75b5wUAQ9x5BE8fvN8jKQoARPfyKSWVO+WHyf748ZwRZnDK atmCU3zhxAbgv59CyUnmOh0HdfeL/5y9XJI2q+R7Mmo5t/yl37R3FGWE5o9QxlibLLvR wOblwTShyfDvoFGQpFsRfxhHetq9cPetuPJ1Fd3X4a0KVK++1ia89Ei+6JDbAc0lm0RO Dixw== X-Gm-Message-State: ALyK8tIo9Hy67d72tmY/e7v2zs5zN3NbIjX9vMYok4ErCrgQUX9kLAVcye/fu+jbveJRVA== X-Received: by 10.98.11.4 with SMTP id t4mr8195933pfi.159.1467176562885; Tue, 28 Jun 2016 22:02:42 -0700 (PDT) Received: from vm-dev.localdomain ([76.126.157.223]) by smtp.gmail.com with ESMTPSA id y70sm1857417pff.25.2016.06.28.22.02.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 22:02:42 -0700 (PDT) X-CudaMail-Envelope-Sender: u9012063@gmail.com From: William Tu To: dev@openvswitch.org X-CudaMail-MID: CM-E1-627100313 X-CudaMail-DTE: 062816 X-CudaMail-Originating-IP: 209.85.192.196 Date: Tue, 28 Jun 2016 22:02:24 -0700 X-ASG-Orig-Subj: [##CM-E1-627100313##][PATCH 3/7] netlink: Fix passing null pointer reported by clang. Message-Id: <1467176548-40488-4-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467176548-40488-1-git-send-email-u9012063@gmail.com> References: <1467176548-40488-1-git-send-email-u9012063@gmail.com> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1467176563 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, MAILTO_TO_SPAM_ADDR, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.30853 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 3/7] netlink: Fix passing null pointer reported by clang. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" In nl_msg_push_flag(), the 3rd NULL parameter causing 'memcpy()' with NULL source pointer in nl_msg_push_unspec(). Signed-off-by: William Tu --- lib/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netlink.c b/lib/netlink.c index 5d8a147..fbdb78e 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -377,7 +377,7 @@ nl_msg_push_unspec(struct ofpbuf *msg, uint16_t type, void nl_msg_push_flag(struct ofpbuf *msg, uint16_t type) { - nl_msg_push_unspec(msg, type, NULL, 0); + nl_msg_push_unspec_uninit(msg, type, 0); } /* Prepends a Netlink attribute of the given 'type' and the given 8-bit 'value'