void out_of_memory(char *str)
{
- rprintf(FERROR, "ERROR: out of memory in %s\n", str);
+ rprintf(FERROR, "ERROR: out of memory in %s [%s]\n", str, who_am_i());
exit_cleanup(RERR_MALLOC);
}
void overflow_exit(char *str)
{
- rprintf(FERROR, "ERROR: buffer overflow in %s\n", str);
+ rprintf(FERROR, "ERROR: buffer overflow in %s [%s]\n", str, who_am_i());
exit_cleanup(RERR_MALLOC);
}
if ((p = strchr(p, '/')) != NULL)
*p = '\0';
if (safe_stat(path, &st) < 0) {
- *p++ = '/';
+ if (p)
+ *p = '/';
goto done;
}
if (S_ISLNK(st.st_mode)) {