You've already forked fido2-manage.cpp
mirror of
https://github.com/token2/fido2-manage.cpp.git
synced 2026-06-22 14:42:52 -07:00
Fix #4 - null hwnd dereference in RefreshData
The global hwnd was shadowed by a local variable declaration in _tWinMain, leaving the global permanently NULL. RefreshData() passed this NULL handle to DisableAllButtons(), dereferencing it on every Refresh click. Removing the local type specifier assigns the created window to the global so all callers outside _tWinMain see a valid handle. Fixes #4
This commit is contained in:
+1
-1
@@ -586,7 +586,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm
|
||||
|
||||
|
||||
|
||||
HWND hwnd = CreateWindowEx(
|
||||
hwnd = CreateWindowEx(
|
||||
WS_EX_APPWINDOW, // Extended window styles
|
||||
_T("DeviceInfoApp"), // Window class name
|
||||
_T("FIDO2.1 Manager"), // Window title
|
||||
|
||||
Reference in New Issue
Block a user