Move parsing code before separator check
Related: RHEL-83153
This commit is contained in:
parent
23d5ff6d72
commit
715b276a8d
@ -21,7 +21,9 @@ Patch: 0001-Do-not-leak-file-descriptors-in-backup_crontab.patch
|
|||||||
Patch: re-introduce-the-test-for-existence-of-file.patch
|
Patch: re-introduce-the-test-for-existence-of-file.patch
|
||||||
|
|
||||||
# https://github.com/cronie-crond/cronie/pull/200
|
# https://github.com/cronie-crond/cronie/pull/200
|
||||||
Patch: fix-range-parsing.patch
|
# https://github.com/cronie-crond/cronie/pull/201
|
||||||
|
Patch: fix-range-parsing.patch
|
||||||
|
Patch: move_parsing_code.patch
|
||||||
|
|
||||||
Requires: dailyjobs
|
Requires: dailyjobs
|
||||||
|
|
||||||
|
36
move_parsing_code.patch
Normal file
36
move_parsing_code.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From e6c2853856c3103a4add4c3673b3306cc21d341e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <opohorel@redhat.com>
|
||||||
|
Date: Wed, 7 May 2025 13:25:19 +0200
|
||||||
|
Subject: [PATCH] get_range() move parsing code before separator check
|
||||||
|
|
||||||
|
In the previous commit the parsing fix was added after a separator check
|
||||||
|
by accident, making it not execute properly. This commit moves it into the
|
||||||
|
right place.
|
||||||
|
---
|
||||||
|
src/entry.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/entry.c b/src/entry.c
|
||||||
|
index 30bedb3..da1a02c 100644
|
||||||
|
--- a/src/entry.c
|
||||||
|
+++ b/src/entry.c
|
||||||
|
@@ -638,13 +638,13 @@ get_range(bitstr_t * bits, int low, int high, const char *names[],
|
||||||
|
state = R_STEP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ if (low_ > high_ && high_ == 0) {
|
||||||
|
+ high_ = 7;
|
||||||
|
+ }
|
||||||
|
if (is_separator(ch)) {
|
||||||
|
state = R_FINISH;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- if (low_ > high_ && high_ == 0) {
|
||||||
|
- high_ = 7;
|
||||||
|
- }
|
||||||
|
return (EOF);
|
||||||
|
|
||||||
|
case R_RANDOM:
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user