Skip to content

Bug | Potential null dereference in Win32 message proc from unchecked hwnd map lookup #226

@AnnaSasDev

Description

@AnnaSasDev

Severity

High (major feature broken)

Describe the bug

Message handler uses hwndToInfiniFrame[hwnd] and dereferences without null-check in WM_ACTIVATE.

Steps to reproduce

  1. Trigger message ordering where WM_ACTIVATE arrives when map entry is missing.
  2. instance can be null.
  3. Dereference occurs.

Expected behavior

Safe lookup (find) + null guard.

Actual behavior

Crash risk.

Logs / Error Output

Minimal reproduction

src/InfiniFrame.Native/Platform/Windows/Window.cpp:455
src/InfiniFrame.Native/Platform/Windows/Window.cpp:457
Related map lifecycle:
src/InfiniFrame.Native/Platform/Windows/Window.cpp:360
src/InfiniFrame.Native/Platform/Windows/Window.cpp:486

.NET Version

No response

Project Version / Commit

No response

Operating System

No response

Checklist

  • I searched existing issues
  • I can reproduce this consistently
  • I included logs and/or a reproduction

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions