Skip to content

fix CreateFileMappingA Parameter#8619

Merged
droidmonkey merged 3 commits intokeepassxreboot:developfrom
masahide:patch-1
Oct 28, 2022
Merged

fix CreateFileMappingA Parameter#8619
droidmonkey merged 3 commits intokeepassxreboot:developfrom
masahide:patch-1

Conversation

@masahide
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member

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

@droidmonkey droidmonkey added this to the v2.7.4 milestone Oct 28, 2022
@droidmonkey droidmonkey merged commit 91fafcc into keepassxreboot:develop Oct 28, 2022
@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 backport-pending 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 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 fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants