|
Zbigniew Jędrzejewski-Szmek |
f1004d |
From 853bd5cc72a0d4cbdd07cc3cabc65bef333a0c71 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
Date: Thu, 9 Oct 2014 22:51:35 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
Subject: [PATCH] sd-journal: change check to assert
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
As of 0f99f74a14 'sd-journal: verify that object start with the field
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
name' this condition should never happen.
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
---
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
src/journal/journalctl.c | 3 +--
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
index feb53bd203..7f4bc3229c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
--- a/src/journal/journalctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
+++ b/src/journal/journalctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
@@ -838,8 +838,7 @@ static int list_boots(sd_journal *j) {
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
SD_JOURNAL_FOREACH_UNIQUE(j, data, length) {
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
- if (length < strlen("_BOOT_ID="))
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
- continue;
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
+ assert(startswith(data, "_BOOT_ID="));
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
if (!GREEDY_REALLOC(all_ids, allocated, count + 1))
|
|
Zbigniew Jędrzejewski-Szmek |
f1004d |
return log_oom();
|