Make sure we do not overflow
Make sure we do not overflow

The getcwd() manual page on glibc doesn't tell whether the NUL character
is included or not in the count. Better be safe than sorry, give getcwd()
the MAXPATHLEN value instead of the buffer size (MAXPATHLEN+1).

In practice, we should never see the difference (except if someone uses
4k-long file names), and we are protecting ourselves against malicious
buffer overflow attempts.

	* lib/libport/file-library.cc: Use MAXPATHLEN instead of
	MAXPATHLEN+1 in getcwd() to prevent potential buffer overflow
	attempts.

aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport