Skip to content

Commit

Permalink
[bugfix](cloud) few variable not initialized (#32868)
Browse files Browse the repository at this point in the history
../../cloud/src/recycler/meta_checker.cpp
can cause uninitialised memory read.
  • Loading branch information
Vallishp authored Mar 28, 2024
1 parent 57612e4 commit 7f479ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud/src/recycler/meta_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ bool MetaChecker::check_fdb_by_fe_meta(MYSQL* conn) {
int num_row = mysql_num_rows(result);
for (int i = 0; i < num_row; ++i) {
MYSQL_ROW row = mysql_fetch_row(result);
TabletInfo tablet_info;
TabletInfo tablet_info = { 0 };
tablet_info.tablet_id = atoll(row[0]);
tablet_info.schema_version = atoll(row[4]);
tablets.push_back(std::move(tablet_info));
Expand All @@ -197,7 +197,7 @@ bool MetaChecker::check_fdb_by_fe_meta(MYSQL* conn) {
tablet_info.partition_id = atoll(row[6]);
tablet_info.index_id = atoll(row[7]);

PartitionInfo partition_info;
PartitionInfo partition_info = { 0 };
partition_info.db_id = atoll(row[4]);
partition_info.table_id = atoll(row[5]);
partition_info.partition_id = atoll(row[6]);
Expand Down

0 comments on commit 7f479ea

Please sign in to comment.