Comment 2 for bug 1807986

Revision history for this message
Erich Cordoba (ericho) wrote :

Seems the bug can be here:
https://github.com/openstack/stx-fault/blob/master/fm-common/sources/fmAlarmUtils.cpp#L205

static void str_to_vector(const std::string &s, std::vector<std::string> &alarm) {
 size_t offset = 0;
 alarm.clear();
 while (true) {
  size_t beg = (offset==0) ? 0 : s.find("###",offset);
  if (beg==std::string::npos) break;
  size_t e = s.find("###",beg+3);
  std::string cont = s.substr(beg+3,e-(beg+3));
  alarm.push_back(cont);
  offset=e;
 }
}