summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-09-11 17:51:20 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-09-11 17:52:20 +0200
commitbc48bd83d322e9cb2ba1642a94ef4772ebb6a1ec (patch)
tree1e4213c6b21206846b3bdebb2eab711e48f34fb9 /src
parentrepart: Reuse partition_needs_populate() more (diff)
downloadsystemd-bc48bd83d322e9cb2ba1642a94ef4772ebb6a1ec.tar.xz
systemd-bc48bd83d322e9cb2ba1642a94ef4772ebb6a1ec.zip
repart: Fix memory corruption
Diffstat (limited to 'src')
-rw-r--r--src/partition/repart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index db746dc740..f3c09b6f4f 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -1788,9 +1788,10 @@ static int config_parse_subvolumes(
if (r == 0)
return 0;
- r = extract_many_words((const char **) &word, ":", EXTRACT_UNQUOTE|EXTRACT_DONT_COALESCE_SEPARATORS, &path, &f);
+ const char *q = word;
+ r = extract_many_words(&q, ":", EXTRACT_UNQUOTE|EXTRACT_DONT_COALESCE_SEPARATORS, &path, &f);
if (r < 0) {
- log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", word);
+ log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", q);
continue;
}