Skip to content
Snippets Groups Projects
Commit b08d631a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Check the return value of chdir() - fixes CID 451056

parent 5d861eed
Branches
Tags
No related merge requests found
......@@ -869,7 +869,10 @@ int main(int argc, char** argv) {
if(fp!=NULL)
fclose(fp);
chdir(bbs_startup.ctrl_dir);
if(chdir(bbs_startup.ctrl_dir) != 0) {
printf("Error %d changing directory to: %s\n", errno, bbs_startup.ctrl_dir);
exit(1);
}
/* Read .cfg files here */
memset(&cfg,0,sizeof(cfg));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment