Move parsing code before separator check
Related: RHEL-82795
This commit is contained in:
parent
fd0c8c5101
commit
a2f5e42837
10
cronie.spec
10
cronie.spec
@ -6,7 +6,7 @@
|
||||
Summary: Cron daemon for executing programs at set times
|
||||
Name: cronie
|
||||
Version: 1.5.7
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
License: MIT and BSD and ISC and GPLv2+
|
||||
URL: https://github.com/cronie-crond/cronie
|
||||
Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz
|
||||
@ -37,7 +37,9 @@ Patch: rename-variables-in-get_range.patch
|
||||
Patch: set-size-out-of-bounds.patch
|
||||
# Fix range parsing
|
||||
# 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
|
||||
|
||||
@ -232,6 +234,10 @@ exit 0
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/dailyjobs
|
||||
|
||||
%changelog
|
||||
* Wed Apr 14 2025 Ondřej Pohořelský <opohorel@redhat.com> - 1.5.7-15
|
||||
- Move parsing code before separator check
|
||||
- Related: RHEL-82795
|
||||
|
||||
* Fri Apr 11 2025 Ondřej Pohořelský <opohorel@redhat.com> - 1.5.7-14
|
||||
- Rename variables in get_range()
|
||||
- Step size out fo bound handling
|
||||
|
||||
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