On Thu, Apr 21, 2022 at 11:07:50AM -0600, Todd C. Miller wrote: > On Thu, 21 Apr 2022 09:35:44 -0700, Jeremy Mates wrote: > > > The cause is an unguarded use of the NULL output pointer. I am pretty > > sure an .exrc cannot cause this condition (map rhs requires > > something, not nothing) only recompiling with a NULL output string > > for some command. > > > > One fix is to guard the "init_nomap = !e_memcmp(qp->output," line in > > common/key.c with something like > > > > if (qp->output) > > init_nomap = !e_memcmp(qp->output, &gp->i_event[gp->i_next], qp->ilen); > > That seems reasonable to me since the other users of qp->output do > check for NULL. We don't need to worry about init_nomap being unset > due to the "goto retry" that happens a few lines down.
This makes sense. As QREM() modifies gp->inext, we can't simply move this assignment down. ok tb