From fae0cf36986951e5d43306138c132f8504ca0904 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 13 Jul 2014 15:38:40 -0400 Subject: [PATCH] Core: Fix potential uninitialized var usage in WII_IPC_HLE_Device_usb If "if (ReadStoredLinkKey->read_all == 1)" is not true, then num_keys_read would be used uninitialized. --- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index b4b2e81ff7..442197c087 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -1512,6 +1512,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadStoredLinkKey(u8* _Input) hci_read_stored_link_key_rp Reply; Reply.status = 0x00; + Reply.num_keys_read = 0; Reply.max_num_keys = 255; if (ReadStoredLinkKey->read_all == 1)