Conversation
Signed-off-by: grandhi_santoshkumar <grandhi_santoshkumar@comcast.com>
ds/audioOutputPortConfig.cpp
Outdated
| } | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
|
|
||
|
|
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| } | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
|
|
||
| printf("\n\n=========================================================================================================================\n\n"); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| } | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
| #else | ||
| printf("\n\n=========================================================================================================================\n\n"); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| pKConSize = (int *) dlsym(dllib, "kConfig_size"); | ||
| pKPortSize = (int *) dlsym(dllib, "kPort_size"); | ||
| if(pKConSize) | ||
| { |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| dlclose(dllib); | ||
| } | ||
| else { | ||
| INT_ERROR("Opening libdshalsrv.so failed\r\n"); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| dlclose(dllib); | ||
| } | ||
| else { | ||
| INT_ERROR("Opening libdshalsrv.so failed\r\n"); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| #if 1 | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
| printf("\n%d:%s print configs dlsym\n", __LINE__, __func__); | ||
|
|
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| #if 1 | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
| printf("\n%d:%s print configs dlsym\n", __LINE__, __func__); | ||
|
|
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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++) { |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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]; |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| #if 1 | ||
| printf("\n\n=========================================================================================================================\n\n"); | ||
| printf("\n%d:%s print configs dlsym\n", __LINE__, __func__); | ||
|
|
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| 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); |
There was a problem hiding this comment.
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
ds/audioOutputPortConfig.cpp
Outdated
| printf("%d:%s: port->id.index = %d\n", __LINE__, __func__, port->id.index); | ||
| } | ||
| } | ||
| else |
There was a problem hiding this comment.
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 <grandhi_santoshkumar@comcast.com>
No description provided.