Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5(EOL)
-
None
Description
Replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...),
where buf is allocated with a size known at compile time.
This makes sure we are not writing outside array/string bounds which will
lead to undefined behaviour. In case the code is trying to write outside bounds - safe version of functions simply cut the string messages so we process this
gracefully.
Pull request: https://github.com/MariaDB/server/pull/2432