From patchwork Mon Apr 20 09:29:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1273234 Return-Path: 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=googlegroups.com (client-ip=2a00:1450:4864:20::137; helo=mail-lf1-x137.google.com; envelope-from=swupdate+bncbcxploxj6ikrb7ww6x2akgqe6q7ko6a@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=peLUaBwJ; dkim-atps=neutral Received: from mail-lf1-x137.google.com (mail-lf1-x137.google.com [IPv6:2a00:1450:4864:20::137]) (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 495Lxt4YFGz9sSg for ; Mon, 20 Apr 2020 19:29:38 +1000 (AEST) Received: by mail-lf1-x137.google.com with SMTP id 66sf4018800lfa.7 for ; Mon, 20 Apr 2020 02:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587374974; cv=pass; d=google.com; s=arc-20160816; b=DsFh9QkykD6sKS9we3vZGG5imXcnFejRZ/xul9uOUMAFDZq9t6imsHK+EJ9t00LgRe hzmB6vJepchn+AkP9cBAmf0CHEkJZxJKHMzMiLS3LrlRwhuclcbJbF+kZ65v1M9dsI1K OLbk/GtbG6vpeGGIw0OyY/sqaoWkMiwdWC50/YnTWXMGNnYxZElofpaCHOP0GowxZ9+g QDrLN7/eEEa13e94Usgu4h5aZEX25mjFeZZgmngivY8kApgKi4ymA0XhX/aJdtE5JUyq ua7XTwq2jyYfHmOeASG9HaYi4LM5A19pdpH/fbwPiCImYs6x6nDKSZNehrHsJcQvjKgc c82Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=IFM3VCwFoeYcXUAFyESy1jkOJSguBoHA2zsxvlWhHc4=; b=ssuSb8GOHe7dmlPzrcUOim0mwkxYvUAopy3DjxmTLQrjLF2kjQRHtKM5h6YL6FT53d Z/fD3xjdyiK9h2uXTRovTOQ4nPQBzFvnmf6B0S1sduo+rW+GuNwISo8Q/4EUi10mHzG9 LOqWz1PvgvgXE3ZXj1BjZS9e+WjbFlUneNVkn6aMa4OxLuLbERQhaq2WhHMLCDuWYQvm UXfCfD+7VizAj/uyNRDhNPkz0vqYx6HXYa+/r5bu8C0RfciFA79dMGNBRv6oxJ2V1UHU WqsI6k6PcClyOeFrLgYaxv9WHEgGWMPhnsLaslFxLZsTxNpK/X3WcBE0ssjzlAEdOxkr lEsw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=IFM3VCwFoeYcXUAFyESy1jkOJSguBoHA2zsxvlWhHc4=; b=peLUaBwJ2WPUK8dfXzYtMtjVlLzZLLcHS5kqd5DvrOdnFSq1NJ81+R+bQyg+xn3g/b QBILajn3D7MkiXW7l3AaTHNCpY5urIS4UTNxe1WYLlZfHpvFava5dtCWZ8cLuMLeDtSb LE5vQ4wntgYbYnSXLl/0GjCJcmtSto27wF0xCYlTQMl63dQVaWRqIoXsHwdxQTp4D2pS KyuZwW9i3IdBZcWZYP0g7I8TVk2BLg0j3r3p6/QOeo2FgmRe6SvvkOLJTHbrMnhl9w1M iJ4r/tmVXMNTpOWvjoULtWY+WWAj5zn3z99cwBKQB6z7jNFlr4vfsYzFjdgRWPNee05c IIXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=IFM3VCwFoeYcXUAFyESy1jkOJSguBoHA2zsxvlWhHc4=; b=PtXBOE6Bq2uQoWDxHWROdug8IGvNVDV5gFKYFaca7OMMqGgG6OfU10W+yUaMuaFFu4 szkkYCaKZIT7h4MvRPIiTEwHuV/zdeVel7A77jPb3W8S3oTde9WmhYLCQZ8PiNKc8klW v805hKkmJf1QHpNQdokZIe99qqYK8Mpw015IEhbrnLDJuVUlz++QVOVoxHNwrqfmqABw O+rMRDrrkm9yVoMiX3+2DMFK26d3Vv/NrrP1aWbXrN2H9uTLIaLKWkwLJvmkTLZsVIqG WVRj1inXfJ+rmt8p0bXYHBbdv5LC/iBuMtdU1HLfEPoypgLWZrQ+prSnLMEF3E0J7UPF yH1A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuaqiWW5TKkbnlIZV49A365IuAYsOLWAL9DrHHGq/GmkhOxU1WuN +gPYGuiIKVoLnXBef1wmOLc= X-Google-Smtp-Source: APiQypLYiNjeRDP78SugIn3EMWxqsvkWy1qTj7PVFuwpiCf0rj910E1dYA5Ki0CgcvUIb9LOrSeDAA== X-Received: by 2002:ac2:53a6:: with SMTP id j6mr9942955lfh.153.1587374974504; Mon, 20 Apr 2020 02:29:34 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:8155:: with SMTP id t21ls1883778ljg.5.gmail; Mon, 20 Apr 2020 02:29:33 -0700 (PDT) X-Received: by 2002:a2e:9011:: with SMTP id h17mr9907190ljg.138.1587374973818; Mon, 20 Apr 2020 02:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587374973; cv=none; d=google.com; s=arc-20160816; b=xUIIHiNIPVQw2FmVruUwgdX3XiFNey4tyH8GZIw2N1ROlEuBxxucH4ubxga7yL/5Tj pzbzPdmddBVDykrnazbzSZrMq3kttviuUHNM1+4jS17A1HIzyQ6JcAujeUEKvjjZkrXX 5ieu2QPrXuaN8SI1lPfHAODWP0aCh6tYVBLf7rtD03wEc1c2ptmB666vj/MXHZDxCbbe Dqcrm2ZEbH1mnRUxc5YMRgfhqF1uLLEybcTJk18OgkCGz1iC4oFCy/y1OYn03thoUN2e k86uOw6cYMa58j4xoL0r5Y6U2XY/KxXhg3sKOzbeHcD3HYQ5rs47/MgZx/FqaF05Cz5O lopA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=N91fgOjn5/JHwwnSqzpfjU0rb9lXE5y3QxtXCBpclpo=; b=aNE7TT49QlQpBjlIu9HuBzL1olYvpnfkrtk2/M/0M7YU+OHI2L/eXKxEwoaJQVmOjI WAUPtQ/6KXpg4ztWZpkM3rGlwqITFXifF5NZ2Pk0uYKOGzEL9KiEGtHnmmGno/44msJd 8Xm9wYkkz+CaHTvV2qZ6IXGvtwUQiuracQeiaG0NpApBnT4nkaaDQ/o3qHNXF/8tAT11 l+U3sBqwolGlQfAsjn2P4xEedGOJ5IbmruTxtYs8+yuDLPaNe7Jg4t4Xi85ScZM6L1DE uM+YrsW+O6isdEfeF7O6nfvFmJzSLaOMdOabAkLxR1MOpg0kP4jDWCaDMqSfA3ddpUZO D03A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id f25si41151lfc.3.2020.04.20.02.29.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 02:29:33 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 495Lxn2MKBz1qsZy; Mon, 20 Apr 2020 11:29:33 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 495Lxn297vz1qtwQ; Mon, 20 Apr 2020 11:29:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id rR0o1nvlLCfN; Mon, 20 Apr 2020 11:29:32 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 20 Apr 2020 11:29:32 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 46A3D4540297; Mon, 20 Apr 2020 11:29:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id fGZNX-9afq4t; Mon, 20 Apr 2020 11:29:28 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id C3131454053E; Mon, 20 Apr 2020 11:29:28 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Fix coverity #292145 Date: Mon, 20 Apr 2020 11:29:26 +0200 Message-Id: <20200420092927.3582-2-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200420092927.3582-1-sbabic@denx.de> References: <20200420092927.3582-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- core/network_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/network_thread.c b/core/network_thread.c index 0b8e0aa..0fd6227 100644 --- a/core/network_thread.c +++ b/core/network_thread.c @@ -129,7 +129,7 @@ int listener_create(const char *path, int type) unlink(path); bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, path); + strlcpy(servaddr.sun_path, path, sizeof(servaddr.sun_path) - 1); if (bind(listenfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0) { close(listenfd);