Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router_t methods should not allocate memory for lookup in outpipes #2794

Closed
sigiesec opened this issue Oct 19, 2017 · 0 comments
Closed

router_t methods should not allocate memory for lookup in outpipes #2794

sigiesec opened this issue Oct 19, 2017 · 0 comments

Comments

@sigiesec
Copy link
Member

E.g. at

blob_t routing_id ((unsigned char*) msg_->data (), msg_->size ());

a blob_t is constructed just to use it as an argument for outpipes.find. Since blob_t is std::basic_string, it will allocate memory. blob_t should be redefined to a type which allows referencing existing memory instead.

Severals similar uses exist in router_t and in some other classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant