commit | 9da4b1fc83fe083c8f194c61402ba4ffeb5b330c | [log] [tgz] |
---|---|---|
author | Tim Duesterhus <tim@bastelstu.be> | Sat Aug 28 23:57:01 2021 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Thu Sep 02 14:01:39 2021 +0200 |
tree | 2d99d28081fe7106094652a01240d38585269b40 | |
parent | d822d9ae2cbc8e713c40c0f7b9e0f2f2225a606d [diff] |
BUG/MINOR threads: Use get_(local|gm)time instead of (local|gm)time Using localtime / gmtime is not thread-safe, whereas the `get_*` wrappers are. Found using GitHub's CodeQL scan. The use in sample_conv_ltime() can be traced back to at least fac9ccfb705702f211f99e67d5f5d5129002086a (first appearing in 1.6-dev3), so all supported branches with thread support are affected. (cherry picked from commit 1f269c12dc31bb63db31559cb44c187ab91abb64) Signed-off-by: Willy Tarreau <w@1wt.eu>