[Winbash-checkins] CVS: winbash/lib/readline complete.c,1.8,1.9
Brought to you by:
enricobrunetta,
xks
From: Enrico B. <enr...@us...> - 2002-03-29 12:08:21
|
Update of /cvsroot/winbash/winbash/lib/readline In directory usw-pr-cvs1:/tmp/cvs-serv24649 Modified Files: complete.c Log Message: Fixed buffer overrun error. tmp was defined to be MAXPATH, which was way too small to copy the value of $PATH (in my case). This was causing a crash when trying to do the following: export PATH="$PATH:~/<TAB> (when you hit TAB, the strcpy (tmp, dirname) would fail, since dirname would contain the whole value for PATH) Index: complete.c =================================================================== RCS file: /cvsroot/winbash/winbash/lib/readline/complete.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- complete.c 26 Mar 2002 13:31:08 -0000 1.8 +++ complete.c 29 Mar 2002 12:08:17 -0000 1.9 @@ -1484,7 +1484,7 @@ static WIN32_FIND_DATA entry; static HANDLE directory = NULL; static BOOL found = 0; - char tmp[MAX_PATH]; + char tmp[2048]; # define DIR void #else struct dirent *entry; |