Projects
openEuler:22.03:LTS:LoongArch
shadow
_service:tar_scm_kernel_repo:backport-Do-not-re...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm_kernel_repo:backport-Do-not-return-garbage-in-run_parts.patch of Package shadow
From b2bc1f692736debf3ba94872db73435d114d19ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com> Date: Mon, 3 Jan 2022 13:12:31 +0100 Subject: [PATCH] Do not return garbage in run_parts If scandir(3) returns 0, the uninitialized value of execute_result will be returned. Reference: https://github.com/shadow-maint/shadow/commit/b2bc1f692736debf3ba94872db73435d114d19ec Conflict: NA --- lib/run_part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/run_part.c b/lib/run_part.c index 884bbefa..1e4f154b 100644 --- a/lib/run_part.c +++ b/lib/run_part.c @@ -48,7 +48,7 @@ int run_parts (const char *directory, const char *name, const char *action) int execute_result; scanlist = scandir (directory, &namelist, 0, alphasort); - if (scanlist<0) { + if (scanlist<=0) { return (0); } -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.