1
0
forked from rpms/cronie
cronie/SOURCES/0003-Fix-regression-in-handling-x-crontab-entries.patch
2022-05-19 10:09:56 +00:00

29 lines
753 B
Diff

From 299ef06ea4371afa97301cec64dc8f21c4f7b11b Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz@fedoraproject.org>
Date: Tue, 22 Mar 2022 14:35:48 +0100
Subject: [PATCH 3/4] Fix regression in handling */x crontab entries
Fixes #102
---
src/entry.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/entry.c b/src/entry.c
index 15ce9b5..e9e258b 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -563,7 +563,9 @@ get_range(bitstr_t * bits, int low, int high, const char *names[],
return (EOF);
case R_STEP:
- if (get_number(&num3, 0, PPC_NULL, file) != EOF) {
+ unget_char(ch, file);
+ if (get_number(&num3, 0, PPC_NULL, file) != EOF
+ && num3 != 0) {
state = R_TERMS;
break;
}
--
2.35.1