Fix an infinite loop in fortune(6).
authorfcambus <fcambus@openbsd.org>
Fri, 2 Jun 2017 20:02:39 +0000 (20:02 +0000)
committerfcambus <fcambus@openbsd.org>
Fri, 2 Jun 2017 20:02:39 +0000 (20:02 +0000)
commitf194f74eddd6d4379a9f1bdeb151cef6dd42ef07
tree7a03c467c5e55b458c2c29cdb188dafe3b545118
parentbef920b08ab54351c76e6c1e1ffccee2238e9c5b
Fix an infinite loop in fortune(6).

When invoking fortune with the -l option (to get long dictums only),
the program gets stuck in an infinite loop because fortlen() doesn't
return the fortune length correctly.

OK mestre@, tb@, deraadt@, schwarze@
games/fortune/fortune/fortune.c