Reviewed by:	Bruce Evans <bde@freebsd.org>
Reviewed by:	Bruce Evans <bde@freebsd.org>

Guard against possible buffer overrun in filename passed.
Another candidate for 2.2.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase