Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.2, 10.6.3, 10.6.4, 10.6.5
-
LLP64 (e.g., 64-bit Microsoft Windows)
Description
MDEV-25743 added some more use of the printf-style format "%.*s" that expects the length of a string as int and a pointer to the start of the string. Some calls were passing the return value of std::string::size() as the length parameter, although that length is size_t. On 64-bit platforms that follow the LLP64 convention (such as 64-bit Microsoft Windows), sizeof(int)<sizeof(size_t) and incorrect code could be emitted, at least in theory.
I am not aware of any real issue due to this.
Note: the sign mismatch (int is signed and size_t is unsigned) should not be an issue, because we assume that the target architecture uses 2’s complement arithmetics and that sizeof(int)>=4. Any strings that are being output should be much smaller than 2 gigabytes.
Attachments
Issue Links
- is caused by
-
MDEV-25743 Unnecessary copying of table names in InnoDB dictionary operations
- Closed