]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r300705 (compensating for fortune moving from games to usr.bin)
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 1 Jun 2016 22:39:15 +0000 (22:39 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 1 Jun 2016 22:39:15 +0000 (22:39 +0000)
commit4b723cc7fe0ac65146bda8f820c263fdd4e8a603
treeaa03f637670aade953853fb8d2b5523f161ffd9a
parent1a643271c5122e8a883243190a322b09ccc27d41
MFC r300705 (compensating for fortune moving from games to usr.bin)

Avoid buffer overflow when copying the input file name and appending .dat.

Check the return value from fread() to be sure that it was successful.

Reported by: Coverity
CID: 10067091009452

git-svn-id: svn://svn.freebsd.org/base/stable/10@301178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
games/fortune/unstr/unstr.c