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 D8AE0138206 for ; Tue, 16 Jan 2018 19:14:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D4C2E089D; Tue, 16 Jan 2018 19:14:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0A56E089D for ; Tue, 16 Jan 2018 19:14:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DFCC1335C34 for ; Tue, 16 Jan 2018 19:14:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 409591B8 for ; Tue, 16 Jan 2018 19:14:10 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1516129882.4af5a80b0c516773286cc30e743dc90a2d19df23.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-misc.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 4af5a80b0c516773286cc30e743dc90a2d19df23 X-VCS-Branch: master Date: Tue, 16 Jan 2018 19:14: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: b944b82a-371d-463e-8267-508f78928798 X-Archives-Hash: 62e7062df65e5b12bea18ad4f5351f88 commit: 4af5a80b0c516773286cc30e743dc90a2d19df23 Author: William Hubbs gmail com> AuthorDate: Tue Jan 16 19:11:22 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Jan 16 19:11:22 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=4af5a80b _rc_deptree_load - return NULL if the stat() call is not successful X-Gentoo-Bug: 643084 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=643084 src/rc/rc-misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c index 33a17b35..21c06fc5 100644 --- a/src/rc/rc-misc.c +++ b/src/rc/rc-misc.c @@ -380,7 +380,10 @@ RC_DEPTREE * _rc_deptree_load(int force, int *regen) eend (retval, "Failed to update the dependency tree"); if (retval == 0) { - stat(RC_DEPTREE_CACHE, &st); + if (stat(RC_DEPTREE_CACHE, &st) != 0) { + eerror("stat(%s): %s", RC_DEPTREE_CACHE, strerror(errno)); + return NULL; + } if (st.st_mtime < t) { eerror("Clock skew detected with `%s'", file); eerrorn("Adjusting mtime of `" RC_DEPTREE_CACHE