Skip to content
Snippets Groups Projects
Commit 9f7bc01f authored by Yorhel's avatar Yorhel
Browse files

Fixed segfault when launched on a nonexistant directory

Forgot to check the return value of path_absolute() in path_real(),
path_absolute() would return an error when getcwd() fails.

Fixes bug #3012787.
parent 4d188cb9
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ git - ? ...@@ -3,6 +3,7 @@ git - ?
- Count the size of a hard linked file once for each directory it appears in - Count the size of a hard linked file once for each directory it appears in
- Fixed crash on browsing dirs with a small window size (#2991787) - Fixed crash on browsing dirs with a small window size (#2991787)
- Fixed buffer overflow when some directories can't be scanned (#2981704) - Fixed buffer overflow when some directories can't be scanned (#2981704)
- Fixed segfault when launched on a nonexistant directory (#3012787)
- Fixed segfault when root dir only contains hidden files - Fixed segfault when root dir only contains hidden files
- Improved browsing performance - Improved browsing performance
- More intuitive multi-page browsing - More intuitive multi-page browsing
......
...@@ -201,7 +201,8 @@ char *path_real(const char *orig) { ...@@ -201,7 +201,8 @@ char *path_real(const char *orig) {
if(orig == NULL) if(orig == NULL)
return NULL; return NULL;
tmp = path_absolute(orig); if((tmp = path_absolute(orig)) == NULL)
return NULL;
ret = path_real_rec(tmp, &links); ret = path_real_rec(tmp, &links);
free(tmp); free(tmp);
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment