X-Git-Url: https://git.pld-linux.org/gitweb.cgi?p=packages%2FSysVinit.git;a=blobdiff_plain;f=time-parsing.patch;fp=time-parsing.patch;h=0000000000000000000000000000000000000000;hp=1871646d208f756b6228f3a1d116ab32a0860a51;hb=f24bb79f4b3c60003f2e8fa955c70017d7172ee4;hpb=6d5059b79005ab36abfeca9f9d9bb0f4ac06263d diff --git a/time-parsing.patch b/time-parsing.patch deleted file mode 100644 index 1871646..0000000 --- a/time-parsing.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- sysvinit-2.96/src/shutdown.c.org 2020-02-24 14:20:54.265362805 +0100 -+++ sysvinit-2.96/src/shutdown.c 2020-02-27 10:24:16.865892277 +0100 -@@ -778,16 +778,18 @@ int main(int argc, char **argv) - if (!strcmp(when, "now")) strcpy(when, "0"); - - sp = when; -- if (when[0] == '+') sp++; -- /* Decode shutdown time. */ -+ /* Validate time argument. */ - for ( ; *sp; sp++) { -- if (*sp != ':' && (*sp < '0' || *sp > '9')) -+ if (*sp != '+' && *sp != ':' && (*sp < '0' || *sp > '9')) - usage(); - } -+ sp = when; -+ /* Decode shutdown time. */ -+ if (when[0] == '+') sp++; - if (strchr(when, ':') == NULL) { - /* Time in minutes. */ -- wt = atoi(when); -- if (wt == 0 && when[0] != '0') usage(); -+ wt = atoi(sp); -+ if (wt == 0 && sp[0] != '0') usage(); - } else { - /* Time in hh:mm format. */ - if (sscanf(when, "%d:%2d", &hours, &mins) != 2) usage();