Make sure we don't assume packets have data (though they should), or
that a key has any uids. Found using American Fuzzy Lop.
uint8_t data;
#endif
- if (packet == NULL)
+ if (packet == NULL || packet->data == NULL)
return ONAK_E_INVALID_PARAM;
switch (packet->data[0]) {
struct ll *wl = NULL;
uids = keyuids(key, NULL);
- for (i = 0; uids[i] != NULL; ++i) {
+ for (i = 0; uids != NULL && uids[i] != NULL; ++i) {
words = makewordlist(NULL, uids[i]);
for (wl = words; wl != NULL; wl = wl->next) {
if (llfind(wordlist, wl->object,