mirror of
https://github.com/systemd/systemd.git
synced 2024-12-03 15:23:36 +08:00
pcrlock: check for embedded NUL bytes
This commit is contained in:
parent
8c8d2cfd4b
commit
c7da9e9a65
@ -1125,6 +1125,11 @@ static int event_log_load_userspace(EventLog *el) {
|
||||
|
||||
b[bn] = 0; /* Turn it into a string */
|
||||
|
||||
if (memchr(b, 0, bn)) {
|
||||
log_warning("Found record with embedded NUL byte, skipping.");
|
||||
continue;
|
||||
}
|
||||
|
||||
r = json_parse(b, 0, &j, NULL, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse local TPM measurement log file: %m");
|
||||
|
Loading…
Reference in New Issue
Block a user