 - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store    path longer than this.  - Fix an unreached case of check against sizeof buf, which in turn leads    to an off-by-one nul byte write on the stack.  The original condition    can never be satisfied because the passed boundary is the maximum value    that can be returned, so code was harmless.
 - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
   path longer than this.
 - Fix an unreached case of check against sizeof buf, which in turn leads
   to an off-by-one nul byte write on the stack.  The original condition
   can never be satisfied because the passed boundary is the maximum value
   that can be returned, so code was harmless.

MFC after:	1 month

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