Skip to content

Conversation

santoshcomcast
Copy link

No description provided.

@santoshcomcast santoshcomcast requested a review from a team as a code owner September 10, 2025 13:32
@santoshcomcast santoshcomcast requested a review from a team September 10, 2025 13:32
}
printf("\n\n=========================================================================================================================\n\n");


Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 10, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kPort_audio) / sizeof (kPort_audio[0])" is suspicious. Note that "kPort_audio" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
printf("%d:%s: typeCfg->numSupportedCompressions = %zu\n", __LINE__, __func__, typeCfg->numSupportedCompressions);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 10, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kConfigs1) / sizeof (kConfigs1[0])" is suspicious. Note that "kConfigs1" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
printf("%d:%s: typeCfg->numSupportedCompressions = %zu\n", __LINE__, __func__, typeCfg->numSupportedCompressions);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 10, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kConfig_audio) / sizeof (kConfig_audio[0])" is suspicious. Note that "kConfig_audio" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

}
printf("\n\n=========================================================================================================================\n\n");

printf("\n\n=========================================================================================================================\n\n");
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 10, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kPorts1) / sizeof (kPorts1[0])" is suspicious. Note that "kPorts1" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
printf("%d:%s: typeCfg->numSupportedCompressions = %zu\n", __LINE__, __func__, typeCfg->numSupportedCompressions);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 10, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Unsigned compared against 0

This less-than-zero comparison of an unsigned value is never true. "i < 0UL".

Medium Impact, CWE-570
NO_EFFECT

Signed-off-by: grandhi_santoshkumar <[email protected]>
printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
printf("%d:%s: typeCfg->numSupportedCompressions = %zu\n", __LINE__, __func__, typeCfg->numSupportedCompressions);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Negative loop bound

Using unsigned variable "kConfig_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

}
printf("\n\n=========================================================================================================================\n\n");
#else
printf("\n\n=========================================================================================================================\n\n");
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Negative loop bound

Using unsigned variable "kPort_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

pKConSize = (int *) dlsym(dllib, "kConfig_size");
pKPortSize = (int *) dlsym(dllib, "kPort_size");
if(pKConSize)
{
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

dlclose(dllib);
}
else {
INT_ERROR("Opening libdshalsrv.so failed\r\n");
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

dlclose(dllib);
}
else {
INT_ERROR("Opening libdshalsrv.so failed\r\n");
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

#if 1
printf("\n\n=========================================================================================================================\n\n");
printf("\n%d:%s print configs dlsym\n", __LINE__, __func__);

Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

#if 1
printf("\n\n=========================================================================================================================\n\n");
printf("\n%d:%s print configs dlsym\n", __LINE__, __func__);

Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
printf("%d:%s: typeCfg->numSupportedCompressions = %zu\n", __LINE__, __func__, typeCfg->numSupportedCompressions);
printf("%d:%s: typeCfg->numSupportedStereoModes = %zu\n", __LINE__, __func__, typeCfg->numSupportedStereoModes);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Data race condition

Accessing "kConfigs1" without holding lock "dsLock". Elsewhere, "kConfigs1" is written to with "dsLock" held 1 out of 1 times.

Medium Impact, CWE-366
MISSING_LOCK

printf("\n\n=========================================================================================================================\n\n");
printf("\n%d:%s print configs dlsym\n", __LINE__, __func__);

for (size_t i = 0; i < kConfig_size_local; i++) {
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kConfigs1) / sizeof (kConfigs1[0])" is suspicious. Note that "kConfigs1" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

printf("\n%d:%s print configs dlsym\n", __LINE__, __func__);

for (size_t i = 0; i < kConfig_size_local; i++) {
const dsAudioTypeConfig_t *typeCfg = &kConfigs1[i];
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Incorrect sizeof expression

The expression "sizeof (kPorts1) / sizeof (kPorts1[0])" is suspicious. Note that "kPorts1" is a pointer and therefore the division will not return the number of array elements which may have been the intent.

Medium Impact, CWE-467
BAD_SIZEOF

Signed-off-by: grandhi_santoshkumar <[email protected]>
#if 1
printf("\n\n=========================================================================================================================\n\n");
printf("\n%d:%s print configs dlsym\n", __LINE__, __func__);

Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 11, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Double unlock

"pthread_mutex_unlock" unlocks "dsLock" while it is unlocked.

Medium Impact, CWE-765
LOCK

Signed-off-by: grandhi_santoshkumar <[email protected]>
aPortType.enable();
printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 12, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Negative loop bound

Using unsigned variable "kConfig_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

printf("%d:%s: port->id.index = %d\n", __LINE__, __func__, port->id.index);
}
}
else
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Sep 12, 2025

Choose a reason for hiding this comment

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

Coverity issue no longer present as of: undefined

Show issue

Coverity Issue - Negative loop bound

Using unsigned variable "kPort_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

Signed-off-by: grandhi_santoshkumar <[email protected]>
Signed-off-by: grandhi_santoshkumar <[email protected]>
Signed-off-by: grandhi_santoshkumar <[email protected]>
Signed-off-by: grandhi_santoshkumar <[email protected]>
//aPortType.enable();
printf("%d:%s: typeCfg->typeId = %d\n", __LINE__, __func__, typeCfg->typeId);
printf("%d:%s: typeCfg->name = %s\n", __LINE__, __func__, typeCfg->name);
printf("%d:%s: typeCfg->numSupportedEncodings = %zu\n", __LINE__, __func__, typeCfg->numSupportedEncodings);
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverity Issue - Negative loop bound

Using unsigned variable "kConfig_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

printf("%d:%s: port->id.index = %d\n", __LINE__, __func__, port->id.index);
}
}
else
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverity Issue - Negative loop bound

Using unsigned variable "kPort_size_local" in a loop exit condition.

Medium Impact, CWE-606
NEGATIVE_RETURNS

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.

2 participants