Skip to content

Commit

Permalink
Merge pull request #1973 from peter15914/fix-abspath-retval
Browse files Browse the repository at this point in the history
Check NULL from abspath()
  • Loading branch information
jarun authored Dec 19, 2024
2 parents ef6e00c + a238613 commit 5522292
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -8759,6 +8759,11 @@ int main(int argc, char *argv[])

close(fd);
selpath = abspath(optarg, NULL, NULL);
if (!selpath) {
xerror();
return EXIT_FAILURE;
}

unlink(selpath);
}
break;
Expand Down

0 comments on commit 5522292

Please sign in to comment.