Commit 0034ae97 authored by Francis Dupont's avatar Francis Dupont Committed by Tomek Mrugalski
Browse files

[5577] Fixed out of bound bug

parent 5473b440
...@@ -70,6 +70,11 @@ CalloutManager::registerCallout(const std::string& name, CalloutPtr callout) { ...@@ -70,6 +70,11 @@ CalloutManager::registerCallout(const std::string& name, CalloutPtr callout) {
// process). // process).
int hook_index = server_hooks_.getIndex(name); int hook_index = server_hooks_.getIndex(name);
// New hooks can have been registered since the manager was constructed.
if (hook_index >= hook_vector_.size()) {
hook_vector_.resize(server_hooks_.getCount());
}
// Iterate through the callout vector for the hook from start to end, // Iterate through the callout vector for the hook from start to end,
// looking for the first entry where the library index is greater than // looking for the first entry where the library index is greater than
// the present index. // the present index.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment