Index: winsup/cygwin/path.cc =================================================================== RCS file: /home/duda_admin/cvs-mirror/src/winsup/cygwin/path.cc,v retrieving revision 1.45 diff -c -2 -r1.45 path.cc *** winsup/cygwin/path.cc 2000/08/22 17:59:53 1.45 --- winsup/cygwin/path.cc 2000/09/03 16:31:21 *************** *** 2394,2405 **** } ! int len = strlen (pathbuf.get_win32 ()); ! if (len > (buflen - 1)) { ! set_errno (ENAMETOOLONG); return -1; } ! memcpy (buf, pathbuf.get_win32 (), len); ! buf[len] = '\0'; /* errno set by symlink.check if error */ --- 2394,2405 ---- } ! if ( buflen < 0 ) { ! set_errno ( EINVAL ); return -1; } ! ! int len = max ( buflen, (int) strlen ( pathbuf.get_win32 () ) ); ! memcpy (buf, pathbuf.get_win32 (), len ); /* errno set by symlink.check if error */