Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash in galeramon
An std::string was assigned a null value which will cause a crash.
  • Loading branch information
markus456 committed Jan 4, 2019
1 parent 2fde4ba commit 8c437c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/modules/monitor/galeramon/galeramon.cc
Expand Up @@ -208,9 +208,9 @@ void GaleraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
info.local_state = atoi(row[1]);
}

if (strcmp(row[0], "wsrep_cluster_state_uuid") == 0)
if (strcmp(row[0], "wsrep_cluster_state_uuid") == 0 && row[1] && *row[1])
{
info.cluster_uuid = row[1] && *row[1] ? MXS_STRDUP(row[1]) : NULL;
info.cluster_uuid = row[1];
}
}

Expand Down

0 comments on commit 8c437c6

Please sign in to comment.