fix: binary parser sometimes reads out of packet bounds when results …#2601
Merged
sidorares merged 1 commit intosidorares:masterfrom Apr 18, 2024
Parsonswy:fix/typecast-false-null-oob
Merged
fix: binary parser sometimes reads out of packet bounds when results …#2601sidorares merged 1 commit intosidorares:masterfrom Parsonswy:fix/typecast-false-null-oob
sidorares merged 1 commit intosidorares:masterfrom
Parsonswy:fix/typecast-false-null-oob
Conversation
Owner
|
thanks for fix PR and detailed report @Parsonswy ! Do you think it would be possible to include a unit test ( failing without The main change looks good to me |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2601 +/- ##
=======================================
Coverage 90.32% 90.32%
=======================================
Files 71 71
Lines 15725 15727 +2
Branches 1339 1339
=======================================
+ Hits 14204 14206 +2
Misses 1521 1521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…contain null and typecast is false
Contributor
Author
|
@sidorares Certainly. Test added. |
Collaborator
|
LGTM 🚀 |
This was referenced May 19, 2024
Vylpes
pushed a commit
to Vylpes/Droplet
that referenced
this pull request
May 28, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mysql2](https://sidorares.github.io/node-mysql2/docs) ([source](https://github.com/sidorares/node-mysql2)) | dependencies | patch | [`3.9.3` -> `3.9.7`](https://renovatebot.com/diffs/npm/mysql2/3.9.3/3.9.7) | --- ### Release Notes <details> <summary>sidorares/node-mysql2 (mysql2)</summary> ### [`v3.9.7`](https://github.com/sidorares/node-mysql2/blob/HEAD/Changelog.md#397-2024-04-21) [Compare Source](sidorares/node-mysql2@v3.9.6...v3.9.7) ##### Bug Fixes - **security:** sanitize timezone parameter value to prevent code injection ([#​2608](sidorares/node-mysql2#2608)) ([7d4b098](sidorares/node-mysql2@7d4b098)) ### [`v3.9.6`](https://github.com/sidorares/node-mysql2/blob/HEAD/Changelog.md#396-2024-04-18) [Compare Source](sidorares/node-mysql2@v3.9.5...v3.9.6) ##### Bug Fixes - binary parser sometimes reads out of packet bounds when results contain null and typecast is false ([#​2601](sidorares/node-mysql2#2601)) ([705835d](sidorares/node-mysql2@705835d)) ### [`v3.9.5`](https://github.com/sidorares/node-mysql2/blob/HEAD/Changelog.md#395-2024-04-17) [Compare Source](sidorares/node-mysql2@v3.9.4...v3.9.5) ##### Bug Fixes - revert breaking change in results creation ([#​2591](sidorares/node-mysql2#2591)) ([f7c60d0](sidorares/node-mysql2@f7c60d0)) ### [`v3.9.4`](https://github.com/sidorares/node-mysql2/blob/HEAD/Changelog.md#394-2024-04-09) [Compare Source](sidorares/node-mysql2@v3.9.3...v3.9.4) ##### Bug Fixes - **docs:** improve the contribution guidelines ([#​2552](sidorares/node-mysql2#2552)) ([8a818ce](sidorares/node-mysql2@8a818ce)) - **security:** improve results object creation ([#​2574](sidorares/node-mysql2#2574)) ([4a964a3](sidorares/node-mysql2@4a964a3)) - **security:** improve supportBigNumbers and bigNumberStrings sanitization ([#​2572](sidorares/node-mysql2#2572)) ([74abf9e](sidorares/node-mysql2@74abf9e)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=--> Reviewed-on: https://git.vylpes.xyz/RabbitLabs/Droplet/pulls/304 Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
This was referenced Sep 15, 2024
This was referenced Sep 28, 2024
This was referenced Sep 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2602.
Check the
nullBitmaskBytebefore trying toreadLengthCodedBuffer()whentypeCast: falseon binary results.