From ec5287eeef21264dc42d14632c89d85800c2febe Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 13 Mar 2026 16:38:18 -0500 Subject: [PATCH] Fix possible error handling issue with errno --- src/config.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 6bddbc8d..b0e8775b 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -471,9 +471,11 @@ Config::from_file(const std::string &filepath_) int rv; std::ifstream ifstrm; + errno = 0; ifstrm.open(filepath_); if(!ifstrm.good()) { + errno = errno ? errno : EIO; errs.push_back({errno,filepath_}); return -errno; }