Bug #92271 Make string constructor explicit

Submitted: 3 Sep 2018 8:29 Modified: 3 Sep 2018 17:07
Reporter: Steinar Gunderson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.14 OS:Any
Assigned to: CPU Architecture:Any

[3 Sep 2018 8:29] Steinar Gunderson
Description:
The String class has an implicit constructor from size_t. This causes confusion, as it's possible to do things like

  str = 'c';

which, surprisingly, means to create a 99-character string (the ASCII value of 'c') with undefined contents.

How to repeat:
N/A

Suggested fix:
Mark the constructor in question as explicit.
[3 Sep 2018 17:07] Paul DuBois
Posted by developer:
 
Fixed in 8.0.14.

Code cleanup. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.091 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.