src/nnn.c | 8 ++++++-- diff --git a/src/nnn.c b/src/nnn.c index 2da6c9e2efe932d75966f7edff375aba30e32b52..90c2fc508c736925daf024d4baf2e119309bfdc6 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7857,8 +7857,12 @@ #endif break; #ifndef NOFIFO case 'F': - if (env_opts_id < 0) - g_state.fifobits = atoi(optarg); + if (env_opts_id < 0) { + fd = atoi(optarg); + if ((fd < 0) || (fd > 2)) + return EXIT_FAILURE; + g_state.fifobits = fd; + } break; #endif case 'g':