diff --git a/src/nnn.c b/src/nnn.c index edcf3de3..013e48b5 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4367,6 +4367,8 @@ static int dentfill(char *path, struct entry **dents) num_files = 0; dir_blocks = 0; buf = (char *)alloca(strlen(path) + NAME_MAX + 2); + if (!buf) + return 0; if (fstatat(fd, path, &sb_path, 0) == -1) goto exit;