Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CreateFileMappingA Parameter #8619

Merged
merged 3 commits into from
Oct 28, 2022
Merged

Conversation

masahide
Copy link
Contributor

The last argument of CreateFileMappingA is of type string.

There was a difference in the original implementation of putty(pageant)'s pageant protocol.

In putty(pageant), the thread ID given to the CreateFileMapping mapName is the string '%08x', but in keepassxc, it was a binary number as the thread ID.

According to the CreateFileMapping documentation, the last argument must be of type string.

Changed the thread ID to be assigned to the map name in CreateFileMapping to be an 8-digit hexadecimal number, the same as putty.

Testing strategy

I built on Windows 10 and verified that adding/deleting keys in pageant works correctly.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

The last argument of CreateFileMappingA is of type string.
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.28%. Comparing base (03f11ce) to head (42f580a).
Report is 347 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8619      +/-   ##
===========================================
+ Coverage    64.26%   64.28%   +0.02%     
===========================================
  Files          341      341              
  Lines        44334    44334              
===========================================
+ Hits         28488    28496       +8     
+ Misses       15846    15838       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@droidmonkey
Copy link
Member

Interesting this has been in code for long time and it still worked. Good catch though!

@droidmonkey droidmonkey added pr: backport pending Pull request yet to be backported to a previous release feature: SSH agent bug labels Oct 28, 2022
@droidmonkey droidmonkey added this to the v2.7.4 milestone Oct 28, 2022
@droidmonkey droidmonkey merged commit 91fafcc into keepassxreboot:develop Oct 28, 2022
pull bot pushed a commit to tigerwill90/keepassxc that referenced this pull request Oct 28, 2022
The last argument of CreateFileMappingA is of type string.
@masahide masahide deleted the patch-1 branch October 28, 2022 14:36
pull bot pushed a commit to Tiamat-Tech/keepassxc that referenced this pull request Oct 28, 2022
The last argument of CreateFileMappingA is of type string.
droidmonkey pushed a commit that referenced this pull request Oct 29, 2022
The last argument of CreateFileMappingA is of type string.
@droidmonkey droidmonkey mentioned this pull request Oct 29, 2022
@droidmonkey droidmonkey added pr: backported Pull request backported to previous release and removed pr: backport pending Pull request yet to be backported to a previous release labels Oct 29, 2022
droidmonkey pushed a commit that referenced this pull request Oct 29, 2022
The last argument of CreateFileMappingA is of type string.
@phoerious phoerious added pr: bugfix Pull request that fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: SSH agent pr: backported Pull request backported to previous release pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants