Skip to content

Security fixes#7

Merged
JaviLendi merged 4 commits into
masterfrom
Fixes
May 10, 2026
Merged

Security fixes#7
JaviLendi merged 4 commits into
masterfrom
Fixes

Conversation

@JaviLendi
Copy link
Copy Markdown
Owner

This pull request makes several improvements and bug fixes related to logging, memory safety, and Windows security descriptor handling. The key changes focus on correcting log formatting, preventing integer overflows, and strengthening registry key ACL initialization.

Logging improvements:

  • Fixed the format specifier for hwndFrame in the CloseTab function to use %p for pointer types instead of %x, ensuring correct output on all platforms. (src/SumatraPDF.cpp, src/SumatraPDF.cppL3272-R3272)
  • Corrected the argument placement in a logf call within ForAllUsersStateChanged, ensuring all log values are captured properly. (src/Installer.cpp, src/Installer.cppL615-R615)

Memory safety and correctness:

  • Added explicit size_t casts in the buffer size calculation for WebPDecodeBGRAInto to prevent potential integer overflows when multiplying stride and height. (src/utils/WebpReader.cpp, src/utils/WebpReader.cppL41-R42)

Windows security improvements:

  • Improved the robustness of the ResetRegKeyAcl function by checking the return values of InitializeSecurityDescriptor and InitializeAcl, and by using an empty ACL (instead of a nullptr) when setting the DACL, addressing best practices and preventing unprotected objects. (src/utils/WinUtil.cpp, src/utils/WinUtil.cppL568-R581)

JaviLendi and others added 4 commits May 10, 2026 11:09
… in a SECURITY_DESCRIPTOR

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…s to formatting function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…converted to larger type

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ormatting function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 10, 2026 09:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@JaviLendi JaviLendi merged commit 736f11c into master May 10, 2026
7 of 8 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.

2 participants