diff --git a/ChangeLog b/ChangeLog index f196d6b2c3043711727b1baeb5804a108d8f6bb8..dc819efc158aad0fc4169fbd206171cb611981ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ git - ? - 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 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 - Improved browsing performance - More intuitive multi-page browsing diff --git a/src/path.c b/src/path.c index 24243d611835414d9605f74109f8aa8393be48bf..98a7a17a2597143dd359f7da75828c86d3c9a7e7 100644 --- a/src/path.c +++ b/src/path.c @@ -201,7 +201,8 @@ char *path_real(const char *orig) { if(orig == NULL) return NULL; - tmp = path_absolute(orig); + if((tmp = path_absolute(orig)) == NULL) + return NULL; ret = path_real_rec(tmp, &links); free(tmp); return ret;