hmmlib2 2.0.12: Clamp ref->offset to text_len

master
Matt Mascarenhas 1 year ago
parent c104500020
commit a6a9653306
  1. 9
      hmmlib2/hmmlib.h

@ -696,6 +696,13 @@ static void _hmml_parse_timestamps(struct _hmml_parser* p)
}
}
for(size_t i = 0; i < ts.reference_count; ++i) {
HMML_Reference* ref = ts.references + i;
if(ref->offset > text_len) {
ref->offset = text_len;
}
}
_hmml_persist_array(p, &p->out.timestamps, &p->out.timestamp_count, ts);
}
}
@ -813,7 +820,7 @@ void hmml_free(HMML_Output* out)
}
const struct HMML_Version hmml_version = {
2, 0, 11
2, 0, 12
};
#undef HSTX

Loading…
Cancel
Save