Commit 451f1199 by Uros Bizjak Committed by Uros Bizjak

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
parent dea91a66
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment