This is an automated email from the ASF dual-hosted git repository.
duke8253 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new b45793d117 check return value of stat() (#10272)
b45793d117 is described below
commit b45793d11729f01e9889f9735b24f296be89882e
Author: Fei Deng <[email protected]>
AuthorDate: Wed Aug 23 14:03:10 2023 -0400
check return value of stat() (#10272)
---
plugins/experimental/ssl_session_reuse/src/config.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/experimental/ssl_session_reuse/src/config.cc
b/plugins/experimental/ssl_session_reuse/src/config.cc
index 0ac315631d..7d8c5cd9c8 100644
--- a/plugins/experimental/ssl_session_reuse/src/config.cc
+++ b/plugins/experimental/ssl_session_reuse/src/config.cc
@@ -99,7 +99,9 @@ Config::setLastConfigChange()
time_t oldLastmtime = m_lastmtime;
memset(&s, 0, sizeof(s));
- stat(m_filename.c_str(), &s);
+ if (stat(m_filename.c_str(), &s) != 0) {
+ return false;
+ }
m_lastmtime = s.st_mtime;