| Bug #115166 | Use of uninitialized variable in `sql\dd\impl\types\column_impl.cc` | ||
|---|---|---|---|
| Submitted: | 29 May 2024 14:29 | Modified: | 29 May 2024 14:41 |
| Reporter: | Yu Xiao | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
| Version: | mysql-trunk, 8.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[29 May 2024 14:41]
MySQL Verification Team
Hello! Thank you for the report and feedback. regards, Umesh

Description: File: sql\dd\impl\types\column_impl.cc Function: `Column_impl::deserialize` Detail: bool Column_impl::deserialize(Sdi_rcontext *rctx, const RJ_Value &val) { ... // `srs_id_is_null` declared without initializing bool srs_id_is_null; // `read` function may exit without assignning to `srs_id_is_null` read(&srs_id_is_null, val, "srs_id_null"); if (!srs_id_is_null) { // use of uninitialized variable ... } ... } How to repeat: We found that similar bug in `sql\dd\impl\types\spatial_reference_system_impl.cc` has been fixed previously, please look at the url: https://github.com/mysql/mysql-server/commit/2efb8b64e57cf23e7b56cb6a70306751e28e2301#diff.... Suggested fix: Initialize `srs_id_is_null`: bool srs_id_is_null{false};