summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch23
1 files changed, 0 insertions, 23 deletions
diff --git a/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch b/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch
deleted file mode 100644
index 953373ee49..0000000000
--- a/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From a25fd0d4bd3cf652e55c24e7dc873fe530fa111a Mon Sep 17 00:00:00 2001
2From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
3Date: Mon, 16 Dec 2013 23:35:30 +0100
4Subject: [PATCH] journal-file: protect against alloca(0)
5
6---
7 src/journal/journal-file.c | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
11index 090cf97..8ea258b 100644
12--- a/src/journal/journal-file.c
13+++ b/src/journal/journal-file.c
14@@ -2737,7 +2737,8 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
15 ts.realtime = le64toh(o->entry.realtime);
16
17 n = journal_file_entry_n_items(o);
18- items = alloca(sizeof(EntryItem) * n);
19+ /* alloca() can't take 0, hence let's allocate at least one */
20+ items = alloca(sizeof(EntryItem) * MAX(1u, n));
21
22 for (i = 0; i < n; i++) {
23 uint64_t l, h;