diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-01 09:17:08 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-01 22:45:09 +0200 |
commit | 382886fe1169a917b273fad2136fee241505e789 (patch) | |
tree | b2d259dbd5c28191018150045bbbe3bc053480cc /src/basic/log.c | |
parent | log: introduce log_syntax_parse_error() (diff) | |
download | systemd-382886fe1169a917b273fad2136fee241505e789.tar.xz systemd-382886fe1169a917b273fad2136fee241505e789.zip |
log: protect errno from log_syntax_invalid_utf8_internal()
Potentially, utf8_escape_invalid() called by
log_syntax_invalid_utf8_internal() may update errno.
Diffstat (limited to '')
-rw-r--r-- | src/basic/log.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/log.c b/src/basic/log.c index 80789ed2f0..c3e61ab5d4 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -1679,6 +1679,7 @@ int log_syntax_invalid_utf8_internal( const char *func, const char *rvalue) { + PROTECT_ERRNO; _cleanup_free_ char *p = NULL; if (rvalue) |