Skip to content

RDKEMW-17573 : Triggering a issue type with more than 35 chars in RRD is leading RDM crash#197

Open
Abhinavpv28 wants to merge 6 commits into
developfrom
feature/rdmcrash
Open

RDKEMW-17573 : Triggering a issue type with more than 35 chars in RRD is leading RDM crash#197
Abhinavpv28 wants to merge 6 commits into
developfrom
feature/rdmcrash

Conversation

@Abhinavpv28
Copy link
Copy Markdown
Contributor

@Abhinavpv28 Abhinavpv28 commented May 13, 2026

Reason For change : Restricing the number of characters allocated for dynamic issue category to 34, since commonutilities has a restriction on postfield, beyond this length causing a crash in rdm

Copilot AI review requested due to automatic review settings May 13, 2026 11:31
@Abhinavpv28 Abhinavpv28 requested a review from a team as a code owner May 13, 2026 11:31
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates processIssueTypeInStaticProfile() in the remote debugger event processing flow by adding an inline comment near the fallback path that checks the installed package when an issue isn’t found in the static JSON profile.

Changes:

  • Added an inline note/TODO comment before calling processIssueTypeInInstalledPackage() when the issue is not present in the static profile.

Comment thread src/rrdEventProcess.c Outdated
else
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d] Issue Data Not found in Static JSON File... \n", __FUNCTION__, __LINE__);
//before this i have to check length of pIssueNode->Node or pIssueNode->Node+pIssueNode->subNode is less than 34 if true only i have to proceed
Copy link
Copy Markdown

Copilot AI commented May 13, 2026

@copilot please work on the comment added in the PR

Addressed in commit efa4d22: removed the unclear inline note from src/rrdEventProcess.c as requested by the PR review comment. No UI changes were involved in this update.

Copilot AI review requested due to automatic review settings May 13, 2026 11:43
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:43
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 899b304
Report detail: https://gist.github.com/rdkcmf-jenkins/e04e078f7dae01113094a4e3ba839f2b'

Copilot AI review requested due to automatic review settings May 13, 2026 11:45
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:45
Copilot AI review requested due to automatic review settings May 13, 2026 11:46
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:46
Copilot AI review requested due to automatic review settings May 13, 2026 11:48
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:48
Copilot AI review requested due to automatic review settings May 13, 2026 11:49
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:49
Copilot AI review requested due to automatic review settings May 13, 2026 11:50
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 13, 2026 11:50
Copilot AI review requested due to automatic review settings May 13, 2026 12:01
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.2%   5917|96.8%  1534|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread src/rrdDynamic.c
Comment thread src/rrdEventProcess.c Outdated
Comment thread src/rrdEventProcess.c Outdated
Comment thread src/rrdDynamic.c Outdated
Comment thread src/rrdDynamic.c Outdated
Copilot AI review requested due to automatic review settings May 13, 2026 12:30
@rdkcentral rdkcentral deleted a comment from Copilot AI May 19, 2026
@Abhinavpv28 Abhinavpv28 changed the title Update rrdEventProcess.c RDKEMW-17573 : Triggering a issue type with more than 35 chars in RRD is leading RDM crash May 19, 2026
fix: remove unclear inline note from static profile fallback path

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ddda5e68-d84d-4a89-ab64-02935f00a57f

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: plan length-validation update for static fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: validate issue node length before installed-package fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: clarify installed-package length guard semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: align length-limit wording with validation semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: improve fallback guard naming and failure logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: centralize issue length and fallback skip logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdEventProcess.c

Update rrdCommon.h

Update rrdDynamic.c

Refactor issueTypeSplitter to include suffix handling

Update rrdEventProcess.c

Update rrdExecuteScript.c

Refactor rrdEventProcess.h to rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdEventProcess.h

Update rrdExecuteScript.h

Update rrdJsonParser.c

Update rrdJsonParser.h

Update rrdInterface.c

Update rrdCommon.h

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix indentation for appendMode assignment

Update rrdCommon.h

Fix appendMode assignment in rrdEventProcess.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdExecuteScript.h

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Remove redundant logging from rrdJsonParser

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Fix heap overflow in issueTypeSplitter and memory leaks in suffix handling

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/fbc52780-966b-4912-825f-3030aa43c3e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Add gtest test cases for split_issue_type

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove build artifacts, add .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Add explicit truncated content assertion in SuffixTruncatedWhenTooSmall test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdJsonParser.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Delete .gitignore

Delete src/unittest/UTJson/device.properties

Update rrdEventProcess.c

Add gtest tests for split_issue_type, suffix field, and processIssueTypeEvent

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/76cad72a-f67f-4c05-8fb5-bfadf0c173b3

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Delete .gitignore

Validate suffix prefix: only _Search- and _LogSearch- are allowed

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/125526c2-7b70-48f5-8bec-fd725eea8a04

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Base never contains underscore: split at first _ and discard invalid suffix

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/904bf10d-546b-4038-a60c-9bc76094a225

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix segfault in GTEST_ENABLE mode when rbuf->jsonPath is NULL

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove accidentally committed dummy directory and update .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix IssueTypeSplitterTest to match new issueTypeSplitter behavior (no built-in special-char removal)

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/00abcaba-8a41-4b88-ae12-07b5ff780ff9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix empty/whitespace IssueType bypassing processIssueTypeEvent guards

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/4de31e24-70d8-496c-ac6a-a5376771d936

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: preserve hyphens in archive filename so portal can parse it correctly

rrd_logproc_convert_issue_type() was converting '-' to '_', turning the
suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_'
separators into the archive filename that broke the analytics portal's
filename parser — it could no longer identify the timestamp field, so
download requests used an incorrect S3 key.

Fix: keep '-' as '-' in the sanitized output. The archive filename now
uses '_' to separate structural fields (MAC, issueType, timestamp) and
'-' within the UUID suffix, giving the portal a reliable delimiter.

Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to
256 bytes so a full UUID suffix never causes a silent truncation failure.

Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz
After:  04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: replace _Search-/_LogSearch- prefix check with suffix length <= 9 rule

split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters.  The old _Search-/_LogSearch-
prefix validation is removed entirely.

Rule:
  strlen(underscore) <= 9  → suffix accepted
  strlen(underscore)  > 9  → suffix discarded

This means:
  - Short session tokens (e.g. "_ab12345", 8 chars) are carried through
  - Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
    preventing extra '_' delimiters from breaking the portal filename parser

Affected tests updated:
  - UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
  - MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
  - BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
  - SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
  - OnlyUnderscoreInput: "_" (1 char) now kept
  - LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
  - SearchSuffixIsValid → LongSuffixIsDiscarded
  - InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
    LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
  - ProcessIssueTypeEvntTest comments updated to reflect new rule

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: improve RRD_MAX_SUFFIX_LEN comment and rename length-based tests

- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
    InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
    SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
    LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
  test does not imply any Search-specific behavior

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdJsonParser.c

Update uploadRRDLogs.c

Update uploadRRDLogs.c

Update rrdJsonParser.c

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdEventProcess.c

sanitize split_issue_type suffix to [A-Za-z0-9_-] to prevent injection

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/72e164ed-ae53-4076-8fb1-5ff1e21375e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Delete .gitignore

Update rrdRunCmdThread.c

Update rrdRunCmdThread.h

Delete src/unittest/UTJson/device.properties

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdRunCmdThread.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdDynamic.c

RRD 1.3.4 release changelog updates

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

fix: harden profile length guard null checks and cleanup

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: tighten strnlen boundary check and indentation

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: use bounded strnlen check and null freed issue pointers

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6235|97.3%  1660|    -      0

1 similar comment
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6235|97.3%  1660|    -      0

AravindanNC
AravindanNC previously approved these changes May 19, 2026
nhanasi
nhanasi previously approved these changes May 19, 2026
Copilot AI review requested due to automatic review settings May 19, 2026 14:30
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6235|97.3%  1660|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread src/rrdCommon.h
Comment thread src/rrdDynamic.c
Comment thread src/rrdDynamic.c
@nhanasi
Copy link
Copy Markdown
Contributor

nhanasi commented May 19, 2026

@Abhinavpv28 - can we add L1/L2 for above scenario change

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot add gtest for new changes

1 similar comment
@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot add gtest for new changes

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot add gtest for new changes

@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.1%   6235|97.3%  1660|    -      0

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot
add gtest for new changes

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot add gtest testcases for new change

Copilot AI review requested due to automatic review settings May 19, 2026 18:24
@Abhinavpv28 Abhinavpv28 dismissed stale reviews from AravindanNC and nhanasi via e33765d May 19, 2026 18:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (4)

src/unittest/rrdUnitTestRunner.cpp:1900

  • These cacheData nodes no longer initialize the prev pointer. remove_item() dereferences cache->prev (rrdCacheprevnode = cache->prev), so leaving it uninitialized can cause undefined behavior/crashes in the test. Initialize prev to NULL for both node and node_dummy.
            }
            free(cacheDataNode);
            cacheDataNode = next;
        }
    }
};

TEST_F(RemoveItemTest, HandlesCacheNull)
{
    remove_item(NULL);

src/unittest/rrdUnitTestRunner.cpp:1967

  • The expected token count/values here don’t match issueTypeSplitter() behavior in rrdEventProcess.c, which only splits on the delimiter and does not remove special characters. For input "a@,b,&,cd,ef" it will return 5 tokens (including "a@" and "&"). Update the assertions or sanitize the input before calling issueTypeSplitter().
{
    char str[] = "a,b.c";
    removeSpecialCharacterfromIssueTypeList(str);

    EXPECT_STREQ(str, "a,b.c");
}

TEST(RemoveSpecialCharacterfromIssueTypeListTest, HandlesStringWithoutCommaAndDot)
{

src/unittest/rrdUnitTestRunner.cpp:2090

  • data_buf rbuf is no longer zero-initialized, leaving fields like appendMode/dsEvent uninitialized. processIssueTypeEvent() reads appendMode and may take different branches nondeterministically. Prefer data_buf rbuf = {}; (or call RRD_data_buff_init) and free rbuf.mdata after the call to avoid leaks.
    EXPECT_STREQ(suffix, "");
}

TEST(SplitIssueTypeTest, BaseTruncatedWhenTooSmall)
{
    /* "abc_suffix": suffix "_suffix" is 7 chars (≤ 9) → accepted.

src/unittest/rrdUnitTestRunner.cpp:1219

  • This test’s setup can’t actually exercise an allocation-failure path: RRDGetProfileStringLength() now enforces RRD_DYNAMIC_PROFILE_MAX_LENGTH via strnlen() and returns -1 for long Node values, so RRDRdmManagerDownloadRequest() will bail out before attempting a large calloc. Update the test to assert the max-length rejection, or introduce a deterministic fault-injection mechanism if you want to cover allocation failures.
    RRDRdmManagerDownloadRequest(NULL, buff.jsonPath, &buff, false);
    free(issuestructNode.Node);
    free(issuestructNode.subNode);
    free(buff.jsonPath);
    free(buff.mdata);
}

TEST_F(RRDRdmManagerDownloadRequestTest, HandlesParamStringAllocFail)
{
    // Simulate calloc failure by passing mSGLength=0 (should skip allocation)
    issueNodeData issuestructNode;
    issuestructNode.Node = strdup("MainNode");

Comment thread src/rrdDynamic.c
boundedNodeLen = strnlen(pissueStructNode->Node, RRD_DYNAMIC_PROFILE_MAX_LENGTH + 1);
if (boundedNodeLen > RRD_DYNAMIC_PROFILE_MAX_LENGTH)
{
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: Issue node length must be less than %d\n", __FUNCTION__, __LINE__, RRD_DYNAMIC_PROFILE_MAX_LENGTH);
Comment on lines +963 to +966
issueNodeData issue;
issue.Node = NULL;
issue.subNode = strdup("SubNode");
int length = RRDGetProfileStringLength(&issue, false);
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|84.3%   6289|97.3%  1676|    -      0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants