-/* $OpenBSD: key.c,v 1.19 2017/04/18 01:45:35 deraadt Exp $ */
+/* $OpenBSD: key.c,v 1.20 2022/04/21 17:50:29 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
}
/* Find out if the initial segments are identical. */
- init_nomap = !e_memcmp(qp->output, &gp->i_event[gp->i_next], qp->ilen);
+ if (qp->output != NULL) {
+ init_nomap =
+ !e_memcmp(qp->output, &gp->i_event[gp->i_next], qp->ilen);
+ }
/* Delete the mapped characters from the queue. */
QREM(qp->ilen);