* server.c (server_setup): Check return value of
getcwd and in case of error set buff[0] to 0.
From-SVN: r218732
+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.
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);
}