-
Notifications
You must be signed in to change notification settings - Fork 321
Port #3857 to release/6.0 #3878
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR ports bug fix #3857 to the release/6.0 branch, addressing issue #3848 by adding a null check before accessing the systemParams.Length property in the TryFetchInputParameterEncryptionInfo method. This prevents a potential NullReferenceException when processing batch RPC commands with Always Encrypted column encryption.
Changes:
- Added null check for
systemParamsbefore accessing itsLengthproperty in both netfx and netcore implementations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs | Added null check for _RPCList[i].systemParams before checking length in parameter encryption metadata fetching logic |
| src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs | Added null check for _RPCList[i].systemParams before checking length in parameter encryption metadata fetching logic |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/6.0 #3878 +/- ##
===============================================
- Coverage 66.72% 63.50% -3.23%
===============================================
Files 285 285
Lines 59160 59160
===============================================
- Hits 39472 37567 -1905
- Misses 19688 21593 +1905
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Port #3857 to release/6.0
Closes #3848
Issues
#3848
Testing
Test to be introduced through #3876
Guidelines
Please review the contribution guidelines before submitting a pull request: