mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
pcrlock: make sure we don't choke on empty records
Follow-up for a434270139
CID#1523832
This commit is contained in:
@@ -1120,7 +1120,11 @@ static int event_log_load_userspace(EventLog *el) {
|
||||
continue;
|
||||
}
|
||||
|
||||
b[bn] = 0;
|
||||
if (!GREEDY_REALLOC(b, bn + 1))
|
||||
return log_oom();
|
||||
|
||||
b[bn] = 0; /* Turn it into a string */
|
||||
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user