From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B74FD1382AC for ; Mon, 20 Jun 2016 03:08:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E8FCF94084; Mon, 20 Jun 2016 03:08:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D19ED94083 for ; Mon, 20 Jun 2016 03:08:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D81E234089F for ; Mon, 20 Jun 2016 03:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6295D2425 for ; Mon, 20 Jun 2016 03:08:22 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1466392032.5000f8ea9c3519fc4e028ab050a58b1f314b2633.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: scanelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 5000f8ea9c3519fc4e028ab050a58b1f314b2633 X-VCS-Branch: master Date: Mon, 20 Jun 2016 03:08:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8f9e0f59-7698-4444-8ff6-53e517d5dd84 X-Archives-Hash: 6df55a3da7c7eb416f59fc8f593e94cf commit: 5000f8ea9c3519fc4e028ab050a58b1f314b2633 Author: Mike Frysinger gentoo org> AuthorDate: Mon Jun 20 03:07:12 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jun 20 03:07:12 2016 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=5000f8ea scanelf: use strcpy to make coverity happy We know ret is always 7 bytes, and pax_short_hf_flags always returns 7 bytes (including a NUL terminator), so use strcpy to keep coverity from throwing a warning about missing NUL. scanelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanelf.c b/scanelf.c index 1f3e356..42fe4c5 100644 --- a/scanelf.c +++ b/scanelf.c @@ -391,7 +391,7 @@ static char *scanelf_file_pax(elfobj *elf, char *found_pax) *found_pax = 1; return (be_wewy_wewy_quiet ? NULL : paxflags); } - strncpy(ret, paxflags, sizeof(ret)); + strcpy(ret, paxflags); } if (be_wewy_wewy_quiet || (be_quiet && !shown))