Skip to content

Replace strlen with strnlen in native code - #5510

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
TravisEz13:fix_StrLen
Nov 22, 2017
Merged

Replace strlen with strnlen in native code#5510
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
TravisEz13:fix_StrLen

Conversation

@TravisEz13

@TravisEz13 Travis Plunk (TravisEz13) commented Nov 20, 2017

Copy link
Copy Markdown
Member

fixes #4975
fix expected vs actual for easier troubleshooting

@TravisEz13
Travis Plunk (TravisEz13) changed the base branch from master to 6.0.0 November 20, 2017 22:40
@TravisEz13 Travis Plunk (TravisEz13) added this to the 6.0.0-GA milestone Nov 20, 2017
@TravisEz13 Travis Plunk (TravisEz13) changed the title Fix str len Replace strlen with strnlen in native code Nov 20, 2017
@TravisEz13 Travis Plunk (TravisEz13) added the Compliance Related to compliance requirements label Nov 20, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please explain a bit about why you made the changes to EXPECT_EQ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The pattern for EXPECT_EQ is EXPECT_EQ(<expected>,<actual>) when you call it with the parameters reverse it makes the error very confusing.

@daxian-dbw

Dongbo Wang (daxian-dbw) commented Nov 20, 2017

Copy link
Copy Markdown
Member

Again, I think we agreed to submit PR targeting master branch, and then cherrypick commits to 6.0.0. Has that process changed?

@daxian-dbw

Copy link
Copy Markdown
Member

Note that the libpsl nuget package needs to be updated once this change is merged.

@TravisEz13
Travis Plunk (TravisEz13) merged commit 9559694 into PowerShell:master Nov 22, 2017
@TravisEz13
Travis Plunk (TravisEz13) deleted the fix_StrLen branch November 22, 2017 00:20
Travis Plunk (TravisEz13) added a commit to TravisEz13/PowerShell that referenced this pull request Nov 29, 2017
* fix expected vs actual for easier troubleshooting
* replace strlen calls with strnlen
Travis Plunk (TravisEz13) added a commit that referenced this pull request Nov 29, 2017
* fix expected vs actual for easier troubleshooting
* replace strlen calls with strnlen
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
* fix expected vs actual for easier troubleshooting
* replace strlen calls with strnlen
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
* fix expected vs actual for easier troubleshooting
* replace strlen calls with strnlen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compliance Related to compliance requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove use for strlen from native code

2 participants