You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
1 year ago
|
From f86a51500b5aa9288dbb2800e0a1f63ad863bd8f Mon Sep 17 00:00:00 2001
|
||
1 year ago
|
From: Michal Sekletar <msekleta@redhat.com>
|
||
|
Date: Wed, 26 Apr 2023 20:07:10 +0200
|
||
|
Subject: [PATCH] pstore: fix crash and forward dummy arguments instead of NULL
|
||
|
|
||
|
[msekleta: in our version of systemd "const char path*" argument of
|
||
|
path_join() can't be NULL. Here we don't really want any subdirs paths
|
||
|
passed into move_file(), but we can't just pass NULL pointers because
|
||
|
they will be forwarded to path_join(). Hence, let's just pass "/"
|
||
|
instead.]
|
||
|
|
||
|
rhel-only
|
||
|
|
||
1 year ago
|
Related: #2190151
|
||
1 year ago
|
---
|
||
|
src/pstore/pstore.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c
|
||
|
index 9f61e8f7f8..5335c9f92d 100644
|
||
|
--- a/src/pstore/pstore.c
|
||
|
+++ b/src/pstore/pstore.c
|
||
|
@@ -366,7 +366,7 @@ static int run(int argc, char *argv[]) {
|
||
|
|
||
|
/* Move left over files out of pstore */
|
||
|
for (size_t n = 0; n < list.n_entries; n++)
|
||
|
- (void) move_file(&list.entries[n], NULL, NULL);
|
||
|
+ (void) move_file(&list.entries[n], "/", "/");
|
||
|
|
||
|
return 0;
|
||
|
}
|