Skip to content

null-terminate registry value in windows_get_device_registry_entry#1948

Merged
charles-lunarg merged 1 commit into
KhronosGroup:mainfrom
aizu-m:registry-value-null-terminate
Jun 24, 2026
Merged

null-terminate registry value in windows_get_device_registry_entry#1948
charles-lunarg merged 1 commit into
KhronosGroup:mainfrom
aizu-m:registry-value-null-terminate

Conversation

@aizu-m

@aizu-m aizu-m commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
  1. RegQueryValueEx sizes manifest_path to the value length, but its docs warn REG_SZ/REG_MULTI_SZ values may not be stored with a terminating null.
  2. windows_add_json_entry then walks that buffer with strlen, so an unterminated value reads past the allocation.

Reserved two bytes and null-terminated the value after the read, as the RegQueryValueEx docs recommend.

@ci-tester-lunarg

Copy link
Copy Markdown

Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build queued with queue ID 16717.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3588 running.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3588 passed.

@charles-lunarg charles-lunarg merged commit d745850 into KhronosGroup:main Jun 24, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants