only happen if ucc_hid_parse() has a bug, better play it safe.
-/* $OpenBSD: ucc.c,v 1.19 2021/08/29 19:00:59 anton Exp $ */
+/* $OpenBSD: ucc.c,v 1.20 2021/08/31 05:16:45 anton Exp $ */
/*
* Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org>
int
ucc_bit_to_sym(struct ucc_softc *sc, u_int bit, const struct ucc_keysym **us)
{
- if (bit >= sc->sc_rawsiz)
+ if (bit >= sc->sc_rawsiz || sc->sc_raw[bit] == NULL)
return 1;
*us = sc->sc_raw[bit];
return 0;