Re: dhcpd timegm error check
Florian Obser <[email protected]>
| Newsgroups | gmane.os.openbsd.tech |
|---|---|
| Message-ID | <[email protected]> |
OK florian On 2026-06-20 05:29 +02, Theo Buehler <[email protected]> wrote: > Another straightforward conversion: > > Index: parse.c > =================================================================== > RCS file: /cvs/src/usr.sbin/dhcpd/parse.c,v > diff -u -p -r1.29 parse.c > --- parse.c 27 Jun 2024 16:39:31 -0000 1.29 > +++ parse.c 20 Jun 2026 03:27:57 -0000 > @@ -552,8 +552,9 @@ parse_date(FILE *cfile) > } > } > > + tm.tm_wday = -1; > guess = timegm(&tm); > - if (guess == -1) { > + if (guess == -1 && tm.tm_wday == -1) { > parse_warn("time could not be represented"); > return (0); > } > -- In my defence, I have been left unsupervised.