journal: check validity of PID field in syslog/kmsg earlier

Then, let's make syslog_parse_identifier() returns PID as pid_t, rather
than the string.

This also makes the function refuse ridiculously long identifier.

Fixes #40456.
Fixes oss-fuzz#477990732 (https://issues.oss-fuzz.com/issues/477990732).
This commit is contained in:
Yu Watanabe
2026-02-03 21:55:49 +09:00
parent dd839b1463
commit eb5b797d7c
5 changed files with 67 additions and 51 deletions
File diff suppressed because one or more lines are too long