Skip to content

cm: fix application crash on cert handler CreateKey call#184

Merged
al1img merged 1 commit intoaosedge:developfrom
mlohvynenko:bugfix_cm_create_key_call
Mar 20, 2026
Merged

cm: fix application crash on cert handler CreateKey call#184
al1img merged 1 commit intoaosedge:developfrom
mlohvynenko:bugfix_cm_create_key_call

Conversation

@mlohvynenko
Copy link
Member

String default constructor initializes internal buffer with nullptr, causing a crash in CreateKey when the param is converted to std::string via CStr call.
Initialize with an empty string literal instead to ensure the internal buffer points to valid memory.

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@de726fb). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #184   +/-   ##
==========================================
  Coverage           ?   82.54%           
==========================================
  Files              ?      325           
  Lines              ?    31083           
  Branches           ?     3220           
==========================================
  Hits               ?    25657           
  Misses             ?     5426           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@al1img al1img left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

Copy link

@MykolaSuperman MykolaSuperman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>

@mlohvynenko mlohvynenko force-pushed the bugfix_cm_create_key_call branch from 1bcbb86 to d55498b Compare March 20, 2026 10:38
Copy link
Collaborator

@mykola-kobets-epam mykola-kobets-epam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably better add default constructor to String, because it uses Array's constructir

Copy link
Collaborator

@mykola-kobets-epam mykola-kobets-epam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>

String default constructor initializes internal buffer with nullptr,
causing a crash in CreateKey when the param is converted
to std::string via CStr call.
Initialize with an empty string literal instead to ensure
the internal buffer points to valid memory.

Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
@mlohvynenko mlohvynenko force-pushed the bugfix_cm_create_key_call branch from d55498b to b075a87 Compare March 20, 2026 11:25
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
42.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@al1img al1img merged commit 8cd93b3 into aosedge:develop Mar 20, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants