server
server copied to clipboard
Extract some of #3360 fixes to 10.11.x
- ~~The Jira issue number for this PR is: MDEV-21978~~
- Sibling of #3485 and #3493
- To clarify, my coding period for Google Summer of Code (GSoC) 2024 ended. While this code originates from my GSoC project, this publication (i.e., commit and PR descriptions) isn’t.
Description
#3360 uncovered countless potential minor security vulnerabilities on my_snprintf uses.
This commit ports a squashed subset of their fixes according to the bug-fixing process to 10.11, covering cases that weren’t applicable for 10.5 (#3485) and 10.6 (#3493).
(My GSoC mentor said that they aren’t much of a problem and I can open a PR normally.)
Similar to the previous iterations, I haven’t searched issues obsolete in 11.6.
Release Notes
- Fixed data size mismatches that were garbling outputs (or possibly even crashes) on problematic platforms – mostly on error messages and debug logs
How can this PR be tested?
I’m not certain how we could catch these human errors besides testing #3360 (MDEV-21978) and syncing this PR with it.
Basing the PR against the correct MariaDB version
- This is a new feature or a refactoring, and the PR is based against the
mainbranch. - [x] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.