Since we can feed localtime(3) with garbage input, or with input it cannot
authormestre <mestre@openbsd.org>
Mon, 20 Aug 2018 06:24:50 +0000 (06:24 +0000)
committermestre <mestre@openbsd.org>
Mon, 20 Aug 2018 06:24:50 +0000 (06:24 +0000)
commit134d3d083422ac96be09f0670aae75c760003582
tree165a7a22473026b20c573d819c05ed17bea351c7
parentda549a4453d02658c61a6489a1bcba50b2bfffef
Since we can feed localtime(3) with garbage input, or with input it cannot
interpret, we always need to check its return value, and in the case it's NULL
then error and exit before proceeding further otherwise in this specific
program we would find a null dereference down the road which would make the
program segfault.

OK cheloha@
usr.sbin/ac/ac.c