]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/calendarspec: fix formatting of entries which collapse to a star 23336/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 May 2022 09:35:52 +0000 (11:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 May 2022 12:35:57 +0000 (14:35 +0200)
commit8e1e59b9ade5b737e24a76bae1944ce84acf564c
treeaa76a985e1f6c9a74e43b6e295a95c9d1a47d900
parent3aff2ae9d5427498f673bcb086d3439d2047e6c9
shared/calendarspec: fix formatting of entries which collapse to a star

We canonicalize repeats that cover the whole range: "0:0:0/1" → "0:0:*".  But
we'd also do "0:0:0/1,0" → "0:0:*,0", which we then refuse to parse.  Thus,
first go throug the whole chain, and print a '*' and nothing else if any of the
components covers the whole range.
src/shared/calendarspec.c
src/test/test-calendarspec.c
test/fuzz/fuzz-calendarspec/crash-parse-star-non-star [new file with mode: 0644]