From: Yu Watanabe Date: Sun, 1 Sep 2024 07:17:08 +0000 (+0900) Subject: log: protect errno from log_syntax_invalid_utf8_internal() X-Git-Tag: v257-rc1~573^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=382886fe1169a917b273fad2136fee241505e789;p=thirdparty%2Fsystemd.git log: protect errno from log_syntax_invalid_utf8_internal() Potentially, utf8_escape_invalid() called by log_syntax_invalid_utf8_internal() may update errno. --- diff --git a/src/basic/log.c b/src/basic/log.c index 80789ed2f07..c3e61ab5d4f 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)