bloomberg/blazingmq

Fix: add checks to pointer arguments in `m_bmqtool_inpututil`

678098 opened this issue · 5 comments

678098 commented

Is there an existing proposal for this?

  • I have searched the existing proposals

Is your feature request related to a problem?

Files: m_bmqtool_inpututil.h and m_bmqtool_inpututil.cpp

There are functions with arguments passed as a pointer, with assumption that these pointer values are not null.

Example:

void InputUtil::preprocessInput(bsl::string* verb,
bsl::string* output,
const bsl::string& input,
bsl::unordered_set<bsl::string>* keys)

Describe the solution you'd like

Add checks to pointer arguments to functions in m_bmqtool_inpututil.

Example:

Cluster::sendRequest(const Cluster::RequestManagerType::RequestSp& request,
mqbnet::ClusterNode* target,
bsls::TimeInterval timeout)
{
BSLS_ASSERT_SAFE(target);

Alternatives you considered

No response

Seems like a simple fix. Can I take this up?

678098 commented

Hi @Dyex719 ! Thanks for your interest, you can proceed with this.
Just a gentle reminder, we have a DCO check for all commits in PR, the simple instruction is here: https://github.com/bloomberg/blazingmq/blob/main/CONTRIBUTING.md#contribution-licensing

678098 commented

Hi @Dyex719! Do you plan to solve this issue?

How can I test these changes?

678098 commented

How can I test these changes?

The PR is good, merged.

Thank you @Dyex719 for your contribution!