Message ID | 20200409142249.20847-3-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBQO7XT2AKGQEKOMRPGQ@googlegroups.com> 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::53d; helo=mail-ed1-x53d.google.com; envelope-from=swupdate+bncbcxploxj6ikrbqo7xt2akgqekomrpgq@googlegroups.com; receiver=<UNKNOWN>) 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=SsXqLnAJ; dkim-atps=neutral Received: from mail-ed1-x53d.google.com (mail-ed1-x53d.google.com [IPv6:2a00:1450:4864:20::53d]) (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 48yjzV1bCLz9sSk for <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2020 00:23:02 +1000 (AEST) Received: by mail-ed1-x53d.google.com with SMTP id g7sf10312368edm.20 for <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2020 07:23:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586442178; cv=pass; d=google.com; s=arc-20160816; b=ngbf6kN69BkgkLnUtwikqVaVCq25J19zDHglzIrqWziG88ZovidEVnnZ/W1G4HVEj1 Ba5aEW3EsubR/yovGetn7ed8FzRJbEonA0xnUW9nLwF85Z1tziV5LlGBDynmQzzNao9G wNSzsoDmNSDq2FwK/kyKZn6bVOL/spB8QDqNcG+g1v6gocBKr/7Vs0bRumFWl0ySvy7N V8Or3Z5asRiZjrLL3ccH6nqx4EMivBLV/te0dn5LAc5UJsW+skSS0byA1kWwJ43om3ck eMrtrS2Xon+z/DSMcXcx3VkEiSX1WiaQ3+wxBFlWHWYCFAopDDr6hGZN7ONDiMcUmkeH a5tw== 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=6TE5qer407C4LmVUCnJzFuqkfQyZpJvRd7bfMTD5baU=; b=WvXaUdyvOIg/xtnT+0Q+n21gVuisQMBT2vtO28HSILSJnvx8ioaZ91EC32evNCfG8F w2HOcdOHqYmYKll3Hk2jvr4YP8+qC2IagSMG67sO7tVUNF6pvuUuSIf4Id3JZyL/qAGk gJ+s5WN10OfYApTRx3c7YzVajSeEzYdtPtoAeqjbcMpgcyXpaTLcuIAapuiOCot8Nlxf zEK5+rN7mHsZL5d/S4zMAoCYCr8xWzCS0ZK2ZVcyZk0DgL2LtF6Ntjh11xXbtpTyG45+ g4gcRclGvcMeBMPsBeVYflcRvZVWLKo5V6jeB11N3TSQGuT6cao+ZxUTQUxABhn9xLWV R08g== 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=6TE5qer407C4LmVUCnJzFuqkfQyZpJvRd7bfMTD5baU=; b=SsXqLnAJNAqANcu+32fd22kU1RyeLkMltUpljSN36ORAakxJXk6JlRxh4wliLU61vR 6hFOsleA2i4QJf0dCawwSiLP3/4bl0uTRAb+2RFNbVkCuKsec5R2QdEr4sdJ59B7FnVD 51IVaKx4x2y0P9eTiVv8bZ0yOQV6i/7kRHEvTg6WyEk+IFzOqrix38BqVw095rQ3uIL2 alAX5kkk6RjlzZQCjtnj55mehjPPC8rDbk1lTxJj4U3KZDzZr6qmgmx4FpRC77wpQ9TR T5EIvq9vg20vEPsty+3o0lGEgEs1705/2/VT/5x7fvFG6fFzFENTqhVENUhtfEA0nTC1 f7jw== 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=6TE5qer407C4LmVUCnJzFuqkfQyZpJvRd7bfMTD5baU=; b=bXp3q0Rvlyt9RAjdl0npCoMcZ9paivH9DwQg0Z8lnhG73fkoJfusHGk1hFPNwKw+nt IPVmKQs7u/IlkxArzOlZaVQwRlzn6aFPzKp0zJmi1IIZl6igDcRgUudckIBI6APUyh5C bB8tfqly7YYG/Wp7bPvilsu8bIMMPPYbV/arvOoMYLH+po2PT8FNetAeJplZgzzOLZPm 7/v6yhJr6bZ0w1QywvPfmcV2tdtbBVe/4dXE1BCiaWHS49Rronc9k01jmeeDkKnBNu6V rYeOEdXeByLFflhu/uwQJdimbHvFujG/eA6cFsLqe5S/gp3T3b536TqBxcs9aHRM3yKC +91A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuaKc375vwCfi2NRVjwZN8Aay/HFzRel4suc9QGMwUIk/scM8M53 JFwkRdXBUpdERWW+XokK29I= X-Google-Smtp-Source: APiQypI5Yi8KFUWTFw7iLDjb3H1CUjdwkRXaZQYsNOnQpTpZ3TnYiLk64+i9C1W18bxmDufysMkB4g== X-Received: by 2002:a17:906:f249:: with SMTP id gy9mr12313611ejb.24.1586442178044; Thu, 09 Apr 2020 07:22:58 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:906:d8b0:: with SMTP id qc16ls9269069ejb.1.gmail; Thu, 09 Apr 2020 07:22:57 -0700 (PDT) X-Received: by 2002:a17:906:c4f:: with SMTP id t15mr11935442ejf.193.1586442177315; Thu, 09 Apr 2020 07:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586442177; cv=none; d=google.com; s=arc-20160816; b=ykohK43mjk35VPDbl8HiYWAbMfnmcSV71OVekiPExYvqP9Gl8jD/PXGuZk68Rbe7la JAKZsjvjeBA+RmxkI1nrGWtgLBWyS7atIxQKY11BtdggvEWoooTYPH/GLUky+UsF7sgA RmRYsK362v9dM+DCYJqL2reHPgUuvLVBvlllKo0OD/G0hXh0YwFqoTnclWo7NQixd2Xg RHdnIfIBGSs2CoZYAScib+QKIx5NuQ+QFls6GGBODd998kkkdKPz+KDtvAr2My+RaFGg f4WlsqKk4N4dcJXb7vtXltcjB8rwE72Z2u3AyaVfeIhouL5oItLQNCIqxhtxw4I1fzlp cVAg== 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=lDyf+CmgtK/QQD0tODOXiVWgQuFoVZ1fnPsn1tuaQ/4=; b=AzcX+NbUXj3K2IgjdKDzz5igpcIAYHkLkJBG85Gfhg4QB0pR6yxYM5pTXEOOvkaRJj LdXay/RZicw+QVj7QLySgkP5D6NHc6+urk7h5jxWIRl9f+CbH8FrhMwleJtmycEOJi8s aX17rTTmJ2qM6QVTy0JSa2aVXOv74mnKH8StjbKxsVMbg1nZGLtzq5XsHryEuUGIHJI5 t/J9ccrNgp+Zwt10PQPeqEaG4yfFRbUA6UP5l//LcKMOPElCth9/27KA9dzFI8Auiyj8 T4iFL5N3rAcaEnU/DRAWyqUF/wfyQVteodHOXqsCVcBhUhCW/HSxm1YpmeazNOqxL6f4 axFw== 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 be1si476906edb.3.2020.04.09.07.22.57 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2020 07:22:57 -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 48yjzP0Mdjz1qsbG; Thu, 9 Apr 2020 16:22:57 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48yjzP0FR5z1qv4D; Thu, 9 Apr 2020 16:22:57 +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 TzMLdgTRC9Dk; Thu, 9 Apr 2020 16:22:56 +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; Thu, 9 Apr 2020 16:22:56 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 9CB344540542; Thu, 9 Apr 2020 16:22:56 +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 k06Adn-5U8Tz; Thu, 9 Apr 2020 16:22:54 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id F0E014540645; Thu, 9 Apr 2020 16:22:51 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] Fix coverity #292168 Date: Thu, 9 Apr 2020 16:22:49 +0200 Message-Id: <20200409142249.20847-3-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200409142249.20847-1-sbabic@denx.de> References: <20200409142249.20847-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 Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Fix coverity #292168
|
expand
|
diff --git a/core/cpio_utils.c b/core/cpio_utils.c index 9fe25a6..cf428aa 100644 --- a/core/cpio_utils.c +++ b/core/cpio_utils.c @@ -687,7 +687,7 @@ int extract_sw_description(int fd, const char *descfile, off_t *offs) ERROR("File Name too long : %s", fdh.filename); return -1; } - strncpy(output_file, TMPDIR, sizeof(output_file)); + strlcpy(output_file, TMPDIR, sizeof(output_file)); strcat(output_file, fdh.filename); fdout = openfileoutput(output_file);
Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/cpio_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)