Blame SOURCES/cronie-check-config-param.patch

78ea20
diff -up cronie-1.4.11/anacron/readtab.c.bla cronie-1.4.11/anacron/readtab.c
78ea20
--- cronie-1.4.11/anacron/readtab.c.bla	2013-07-18 14:27:08.000000000 +0200
78ea20
+++ cronie-1.4.11/anacron/readtab.c	2014-01-27 17:47:41.362138084 +0100
78ea20
@@ -271,7 +271,8 @@ parse_tab_line(char *line)
78ea20
         if (strncmp(env_var, "START_HOURS_RANGE", 17) == 0)
78ea20
         {
78ea20
             r = match_rx("^([[:digit:]]+)-([[:digit:]]+)$", value, 2, &from, &to);
78ea20
-            if ((r == -1) || (from == NULL) || (to == NULL)) goto reg_invalid;
78ea20
+            if (r == -1) goto reg_err;
78ea20
+            if (r == 0) goto reg_invalid;
78ea20
             range_start = atoi(from);
78ea20
             range_stop = atoi(to);
78ea20
             if (range_stop < range_start) {
78ea20
@@ -282,6 +283,8 @@ parse_tab_line(char *line)
78ea20
         }
78ea20
         if (strncmp(env_var, "RANDOM_DELAY", 12) == 0) {
78ea20
             r = match_rx("^([[:digit:]]+)$", value, 0);
78ea20
+            if (r == -1) goto reg_err;
78ea20
+            if (r == 0) goto reg_invalid;
78ea20
             if (r != -1) {
78ea20
                 int i = random();
78ea20
                 double x = 0;
78ea20
@@ -289,7 +292,6 @@ parse_tab_line(char *line)
78ea20
                 random_number = (int)x;
78ea20
                 Debug(("Randomized delay set: %d", random_number));
78ea20
             }
78ea20
-        else goto reg_invalid;
78ea20
         }
78ea20
         if (strncmp(env_var, "PREFERRED_HOUR", 14) == 0) {
78ea20
             r = match_rx("^([[:digit:]]+)$", value, 1, &pref_hour);