From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE5B81395E2 for ; Sun, 27 Nov 2016 00:00:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD33AE0914; Sun, 27 Nov 2016 00:00:14 +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 A7CC8E0914 for ; Sun, 27 Nov 2016 00:00:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 D6C5F3413AA for ; Sun, 27 Nov 2016 00:00:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 47A0549A for ; Sun, 27 Nov 2016 00:00:10 +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: <1480204802.e98d5c97eef7533ec49ad46bbecba60ac38f430f.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qxpak.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: e98d5c97eef7533ec49ad46bbecba60ac38f430f X-VCS-Branch: master Date: Sun, 27 Nov 2016 00:00:10 +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: d25826c9-15c0-47b0-b41d-b5d84a499751 X-Archives-Hash: 7357b8c41bf4c12adbfa312ea2298b47 commit: e98d5c97eef7533ec49ad46bbecba60ac38f430f Author: Mike Frysinger gentoo org> AuthorDate: Sun Nov 27 00:00:02 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Nov 27 00:00:02 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e98d5c97 qxpak: check -d argument qxpak.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qxpak.c b/qxpak.c index baceda9..aa1a281 100644 --- a/qxpak.c +++ b/qxpak.c @@ -393,6 +393,8 @@ int qxpak_main(int argc, char **argv) if (dir_fd != AT_FDCWD) err("Only use -d once"); dir_fd = open(optarg, O_RDONLY|O_CLOEXEC|O_PATH); + if (dir_fd < 0) + errp("Could not open directory %s", optarg); break; } }