OK
On Thu, Mar 11, 2021 at 3:17 PM Ryan Long <ryan.l...@oarcorp.com> wrote: > > CID 26083: Dereference after null check in rtems_shell_login(). > > Closes #4327 > --- > cpukit/libmisc/shell/shell.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c > index 1e5962b..ad47460 100644 > --- a/cpukit/libmisc/shell/shell.c > +++ b/cpukit/libmisc/shell/shell.c > @@ -789,6 +789,8 @@ static bool rtems_shell_login(rtems_shell_env_t *env, > FILE * in,FILE * out) > } > } > > + _Assert(out != NULL); > + > return rtems_shell_login_prompt(in, out, env->devname, env->login_check); > } > > @@ -966,6 +968,9 @@ bool rtems_shell_main_loop( > "shell: cannot allocate prompt memory\n"); > } > > + _Assert(stdin != NULL); > + _Assert(stdout != NULL); > + > shell_std_debug("child out: %d (%p)\n", fileno(stdout), stdout); > shell_std_debug("child in: %d (%p)\n", fileno(stdin), stdin); > > -- > 1.8.3.1 > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel