shell.c: Fix Dereference before null check (CID #1467420)

CID 1467420: Dereference before null check in rtems_shell_line_editor().

Closes #4254
This commit is contained in:
Ryan Long
2021-02-18 09:35:13 -05:00
committed by Joel Sherrill
parent 407e351e11
commit fa25b73ac1

View File

@@ -320,7 +320,10 @@ static int rtems_shell_line_editor(
int cmd = -1;
int inserting = 1;
int in_fileno = fileno(in);
int out_fileno = fileno(out);
int out_fileno;
_Assert(out != NULL);
out_fileno = fileno(out);
/*
* Only this task can use this file descriptor because calling