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

TEST COVERITY. DO NOT MERGE #1826

Closed
wants to merge 1 commit into from
Closed

Conversation

scthunderbolt
Copy link
Contributor

No description provided.

@rdkcmf-jenkins
Copy link

Coverity Issue - Logically dead code

Execution cannot reach this statement: "buffer[index] = c;".

Medium Impact, CWE-561
DEADCODE

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
Source/core/ProcessInfo.cpp:555

@rdkcmf-jenkins
Copy link

Coverity Issue - Logically dead code

Execution cannot reach this statement: "buffer[index] = '\0';".

Medium Impact, CWE-561
DEADCODE

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
Source/core/ProcessInfo.cpp:573

@@ -546,7 +546,8 @@ namespace Core {
char buffer[bufferSize];
while (true) {
char c;
size_t readChars = fread(&c, 1, 1, cmdFile);
size_t readChars = 0;
fread(&c, 1, 1, cmdFile);

Choose a reason for hiding this comment

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

Coverity Issue - Ignoring number of bytes read

"fread(void *, size_t, size_t, FILE *)" returns the number of bytes read, but it is ignored.

Medium Impact, CWE-252
CHECKED_RETURN

@scthunderbolt scthunderbolt added the invalid This doesn't seem right label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants