mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Add range check
This commit is contained in:
parent
0e8819fea8
commit
c597f3be9b
|
@ -7857,8 +7857,12 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
case 'F':
|
case 'F':
|
||||||
if (env_opts_id < 0)
|
if (env_opts_id < 0) {
|
||||||
g_state.fifobits = atoi(optarg);
|
fd = atoi(optarg);
|
||||||
|
if ((fd < 0) || (fd > 2))
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
g_state.fifobits = fd;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'g':
|
case 'g':
|
||||||
|
|
Loading…
Reference in a new issue