On Mon, Jan 18, 2016 at 10:09 AM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote: > On Mon, Jan 18, 2016 at 7:44 AM, Jean Delvare <jdelvare@xxxxxxx> wrote: >>> + >>> + if (dm->type != 0xb2 || dm->length <= 6) >>> + return; >>> + >>> + table = container_of(dm, struct dell_bios_hotkey_table, header); >>> + >>> + hotkey_num = (table->header.length - 4) / >>> + sizeof(struct dell_bios_keymap_entry); >> >> The problem is not introduced by your patch, but the length check is >> inconsistent. sizeof(struct dell_bios_keymap_entry) is 4. > > Yes, but sizeof(struct dell_bios_keymap_table) is 6. No it's not. It's 4. And my math below was all messed up, too. You were exactly right, and I'll fix it. --Andy -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html