Avoid buffer overflow when copying the input file name and appending .dat.
authortruckman <truckman@FreeBSD.org>
Thu, 26 May 2016 01:33:24 +0000 (01:33 +0000)
committertruckman <truckman@FreeBSD.org>
Thu, 26 May 2016 01:33:24 +0000 (01:33 +0000)
commit258d969a37a15bb8c9793035ccdb7fae5e5699fb
treeb588a2bc8715881f367d7c229d5b653d04c4d584
parenteaf1e1649149676f6087590e0b83fa23c961daa9
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: 1006709, 1009452
MFC after: 1 week
usr.bin/fortune/unstr/unstr.c