server.c (server_setup): Check return value of getcwd and in case of error set buff[0] to 0.
* server.c (server_setup): Check return value of getcwd and in case of error set buff[0] to 0. From-SVN: r218732
This commit is contained in:
parent
dea91a66ff
commit
451f119935
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-12-15 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* server.c (server_setup): Check return value of
|
||||
getcwd and in case of error set buff[0] to 0.
|
||||
|
||||
2014-10-21 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* inclhack.def (glibc_c99_inline_4): Add pthread.h to files.
|
||||
|
|
|
@ -192,7 +192,8 @@ server_setup (void)
|
|||
|
||||
fputs ("trap : 1\n", server_pair.pf_write);
|
||||
fflush (server_pair.pf_write);
|
||||
getcwd (buff, MAXPATHLEN + 1);
|
||||
if (getcwd (buff, MAXPATHLEN + 1) == NULL)
|
||||
buff[0] = 0;
|
||||
p_cur_dir = xstrdup (buff);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue