summaryrefslogtreecommitdiffstats
path: root/src/shared/serialize.c
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2024-02-12 18:32:03 +0100
committerMike Yuan <me@yhndnzj.com>2024-02-13 19:22:58 +0100
commit5b1aa0e19a6df603336894604a85df74204d04f9 (patch)
tree4f9e5b61dda9b7af529c8fe3f86b3b851235c654 /src/shared/serialize.c
parentUse tilde for rc tag versioning (diff)
downloadsystemd-5b1aa0e19a6df603336894604a85df74204d04f9.tar.xz
systemd-5b1aa0e19a6df603336894604a85df74204d04f9.zip
core: escape spaces when serializing as well
Otherwise they might get stripped when reading the serialized data back. Resolves: #31214
Diffstat (limited to 'src/shared/serialize.c')
-rw-r--r--src/shared/serialize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/serialize.c b/src/shared/serialize.c
index 7099f67f92..483cbc7419 100644
--- a/src/shared/serialize.c
+++ b/src/shared/serialize.c
@@ -46,7 +46,7 @@ int serialize_item_escaped(FILE *f, const char *key, const char *value) {
if (!value)
return 0;
- c = cescape(value);
+ c = xescape(value, " ");
if (!c)
return log_oom();