Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/ccsp/components/CCSP_AliasMgr/ccsp_alias_mgr_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,15 +1070,15 @@ CcspAliasMgrLookupAliasNode
pChildNode = pChildNode->Sibling;
}
}

if ( !pChildNode )
{
/* CID: 154680 - Logically Dead code */
if ( bInsMatched )
{
pChildNode = pInsNode;
pInsNode = NULL;
}
}
}
else if ( !StringSListIsEmpty(&pChildNode->Aliases))
{
pAliasNode = pChildNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/ccsp/components/common/DataModel/dml/components/DslhCpeController/dslh_cpeco_control.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/ccsp/components/common/DataModel/dml/components/DslhCpeController/dslh_cpeco_control.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1436 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/ccsp/components/common/DataModel/dml/components/DslhCpeController/dslh_cpeco_control.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1344,8 +1344,17 @@
if ( ( CCSP_SUCCESS != returnStatus ) && ( CCSP_CR_ERR_NAMESPACE_OVERLAP != returnStatus ) )
{
AnscTraceWarning(("!!! %s registerCapabilities failed with code %lu! Waiting for %lu seconds to retry...!!! \n", pComponentName, returnStatus, uWait));
AnscSleep(uWait * 1000);
uWait *=2;
/* Convert to ms safely */
uint64_t ms = (uint64_t)uWait * 1000ULL;

/* Clamp for AnscSleep() */
if (ms > ULONG_MAX)
ms = ULONG_MAX;

AnscSleep((ULONG)ms);

/* Exponential backoff: still in seconds! */
uWait = (uWait <= (ULONG_MAX / 2000)) ? (uWait * 2) : (ULONG_MAX / 1000);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/ccsp/components/common/MessageBusHelper/helper/messagebus_interface_helper.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/ccsp/components/common/MessageBusHelper/helper/messagebus_interface_helper.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1247 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/ccsp/components/common/MessageBusHelper/helper/messagebus_interface_helper.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1185,17 +1185,17 @@

if( i > 0 )
{
for(--i; (int)i >= 0; --i)
for (ULONG k = i; k-- > 0; )
{
if(ppReturnVal[i]->parameterName)
if(ppReturnVal[k]->parameterName)
{
AnscFreeMemory(ppReturnVal[i]->parameterName);
ppReturnVal[i]->parameterName = NULL;
AnscFreeMemory(ppReturnVal[k]->parameterName);
ppReturnVal[k]->parameterName = NULL;
}
if(ppReturnVal[i])
if(ppReturnVal[k])
{
AnscFreeMemory(ppReturnVal[i]);
ppReturnVal[i] = NULL;
AnscFreeMemory(ppReturnVal[k]);
ppReturnVal[k] = NULL;
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions source/cosa/package/cli/components/ScliShell/scli_shell_bic.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/cli/components/ScliShell/scli_shell_bic.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/cli/components/ScliShell/scli_shell_bic.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 2497 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/cli/components/ScliShell/scli_shell_bic.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1748,8 +1748,10 @@
ScliShoInitArgMatchResult(&pOptArgM[i]);
}
}

/* trying to auto complete argument name or value */
if ( !pReqArgM || !pOptArgM ) {
goto EXIT;
}
/* trying to auto complete argument name or value */
bMatched =
ScliShoMatchCommand
(
Expand Down Expand Up @@ -2397,6 +2399,10 @@
}
}

if ( !pReqArgM || !pOptArgM )
{
goto EXIT;
}
bMatched =
ScliShoMatchCommand
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/cli/components/ScliShell/scli_shell_exec.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/cli/components/ScliShell/scli_shell_exec.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 233 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/cli/components/ScliShell/scli_shell_exec.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -134,8 +134,7 @@
(ANSC_HANDLE)pMyObject,
hSrvSession
);

CmdRequest.CurLineNumber = nRow - 1;
CmdRequest.CurLineNumber = (nRow > 0) ? (ULONG)(nRow - 1) : 0;

if ( ulInputMode == SCLI_SHELL_INPUT_MODE_linemode && nRow > 0 )
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/cli/components/ScliShell/scli_shell_help.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/cli/components/ScliShell/scli_shell_help.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 5526 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/cli/components/ScliShell/scli_shell_help.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -2590,9 +2590,10 @@
int nLast = -1;

/*CID: 74816 Dereference after null check*/
if ( pReqArgMatched ||
ulReqArgCount == 0 ||
(pReqArgMatched && pReqArgMatched[ulReqArgCount - 1].bMatched && pReqArgMatched[ulReqArgCount - 1].bValueMatched) )
if (pReqArgMatched == NULL || ulReqArgCount == 0 ||
(pReqArgMatched != NULL &&
pReqArgMatched[ulReqArgCount - 1].bMatched &&
pReqArgMatched[ulReqArgCount - 1].bValueMatched))
{
int i;
int nMaxTokenPos = -1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/cli/components/ScliShell/scli_shell_process.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/cli/components/ScliShell/scli_shell_process.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 4430 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/cli/components/ScliShell/scli_shell_process.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -2879,6 +2879,10 @@
ScliShoInitArgMatchResult(&pOptArgM[i]);
}
}
if ( !pReqArgM || !pOptArgM )
{
goto EXIT;
}

bMatched =
ScliShoMatchCommand
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/package/system/components/SysRepositoryDriver/sys_rdo_access.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/package/system/components/SysRepositoryDriver/sys_rdo_access.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1380 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/package/system/components/SysRepositoryDriver/sys_rdo_access.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1147,12 +1147,16 @@

goto EXIT2;
}
#if 0
/* CID 178124: Logically dead code (DEADCODE)
At condition pThisFolder, the value of pThisFolder cannot be NULL */
else if ( !pThisFolder )
{
pThisRecord = (PSYS_REPOSITORY_RECORD_OBJECT)NULL;

goto EXIT2;
}
#endif
else if ( AnscTcGetTokenCount(pTokenChain) != 1 )
{
pThisFolder->ReleaseAccess((ANSC_HANDLE)pThisFolder);
Expand Down Expand Up @@ -1318,12 +1322,16 @@

goto EXIT2;
}
#if 0
/* CID 178125: Logically dead code (DEADCODE)
At condition pThisFolder, the value of pThisFolder cannot be NULL */
else if ( !pThisFolder )
{
returnStatus = ANSC_STATUS_BAD_NAME;

goto EXIT2;
}
#endif
else if ( AnscTcGetTokenCount(pTokenChain) != 1 )
{
pThisFolder->ReleaseAccess((ANSC_HANDLE)pThisFolder);
Expand Down
3 changes: 3 additions & 0 deletions source/cosa/utilities/bsp_eng/bspeng_co_process.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/cosa/utilities/bsp_eng/bspeng_co_process.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/cosa/utilities/bsp_eng/bspeng_co_process.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 10936 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/cosa/utilities/bsp_eng/bspeng_co_process.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -808,9 +808,12 @@

if (*pBuf != '/')
return FALSE;
#if 0
/* CID: 340473: Logically Dead code*/
else
if (*pBuf == '\0')
return FALSE;
#endif

ch = *(pBuf+1);

Expand Down
4 changes: 2 additions & 2 deletions source/util_api/ansc/AnscPlatform/ansc_checksum.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscPlatform/ansc_checksum.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscPlatform/ansc_checksum.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 400 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/ansc/AnscPlatform/ansc_checksum.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -130,7 +130,7 @@
{
tempUshort++;
tempUchar += 1;
oldLength -= 1;
oldLength = (oldLength > 0) ? (oldLength - 1) : 0;
}
}

Expand Down Expand Up @@ -164,7 +164,7 @@
{
tempUshort++;
tempUchar += 1;
newLength -= 1;
newLength = (newLength > 0) ? (newLength - 1) : 0;
}
}

Expand Down
4 changes: 3 additions & 1 deletion source/util_api/ansc/AnscPlatform/ansc_task.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/util_api/ansc/AnscPlatform/ansc_task.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'IETF' license found in local file 'source/util_api/ansc/AnscPlatform/ansc_task.c' (Match: rdkb/components/opensource/ccsp/CcspCommonLibrary/rdkb/components/opensource/ccsp/CcspCommonLibrary/2101, 1360 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspCommonLibrary/+archive/rdk-dev-2101.tar.gz, file: source/util_api/ansc/AnscPlatform/ansc_task.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -352,7 +352,8 @@

AnscReleaseTask((ANSC_HANDLE)pTaskRecord);
}

#if 0
CID: 559697: Unreachable. Above is an infinite loop. So logically Unreachable
if ( g_bSafeParenting )
{
AnscWaitAllChildTasks(pTaskRecord->Handle);
Expand All @@ -361,6 +362,7 @@
AnscEraseTask(pTaskRecord);

AnscLeaveTask();
#endif
}


Expand Down
128 changes: 64 additions & 64 deletions source/util_api/asn.1/components/asn1_x509/ansc_asn1_certificate.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,38 +177,38 @@ AnscAsn1GenSelfSignedCertificateWithCryptoAPI

if( pPublicKeyInfo != NULL)
{
pPublicKeyInfo->GenerateKey
(
pPublicKeyInfo,
keyType,
&genParams
);
}

/*
* set the serial number, it supposed to be the MD5 fingerprint of public key
*/
pInteger = (PANSC_ASN1_INTEGER)pThisObject->GetSerialNumber(pThisObject);
pKeyObject = (PANSC_ASN1_OBJECT)pPublicKeyInfo->GetExtraChild(pPublicKeyInfo);

if( pKeyObject != NULL)
{
if( ANSC_STATUS_SUCCESS ==
AnscAsn1GetMD5FingerPrint(pKeyObject, &hash))
{
/* make it as an unnegative value */
if( hash.Value[0] > 0x80)
{
hash.Value[0] -= 0x80;
}

pInteger->SetStringValue
(
pInteger,
hash.Value,
hash.Length
);
}
pPublicKeyInfo->GenerateKey
(
pPublicKeyInfo,
keyType,
&genParams
);

/*
* set the serial number, it supposed to be the MD5 fingerprint of public key
*/
pInteger = (PANSC_ASN1_INTEGER)pThisObject->GetSerialNumber(pThisObject);
pKeyObject = (PANSC_ASN1_OBJECT)pPublicKeyInfo->GetExtraChild(pPublicKeyInfo);

if( pKeyObject != NULL)
{
if( ANSC_STATUS_SUCCESS ==
AnscAsn1GetMD5FingerPrint(pKeyObject, &hash))
{
/* make it as an unnegative value */
if( hash.Value[0] > 0x80)
{
hash.Value[0] -= 0x80;
}

pInteger->SetStringValue
(
pInteger,
hash.Value,
hash.Length
);
}
}
}

/*
Expand Down Expand Up @@ -306,40 +306,40 @@ AnscAsn1GenerateSelfSignedCertificate

if( pPublicKeyInfo != NULL)
{
pPublicKeyInfo->GenerateKey
(
pPublicKeyInfo,
pAttrObject->KeyType,
hKeyPairHandle
);
}

/*
* set the serial number, it supposed to be the MD5 fingerprint of public key
*/
pInteger = (PANSC_ASN1_INTEGER)pThisObject->GetSerialNumber(pThisObject);
pKeyObject = (PANSC_ASN1_OBJECT)pPublicKeyInfo->GetExtraChild(pPublicKeyInfo);

if( pKeyObject != NULL)
{
if( ANSC_STATUS_SUCCESS ==
AnscAsn1GetMD5FingerPrint(pKeyObject, &hash))
{
/* make it as an unnegative value */
if( hash.Value[0] > 0x80)
{
hash.Value[0] -= 0x80;
}
pPublicKeyInfo->GenerateKey
(
pPublicKeyInfo,
pAttrObject->KeyType,
hKeyPairHandle
);

/*
* set the serial number, it supposed to be the MD5 fingerprint of public key
*/
pInteger = (PANSC_ASN1_INTEGER)pThisObject->GetSerialNumber(pThisObject);
pKeyObject = (PANSC_ASN1_OBJECT)pPublicKeyInfo->GetExtraChild(pPublicKeyInfo);

if( pKeyObject != NULL)
{
if( ANSC_STATUS_SUCCESS ==
AnscAsn1GetMD5FingerPrint(pKeyObject, &hash))
{
/* make it as an unnegative value */
if( hash.Value[0] > 0x80)
{
hash.Value[0] -= 0x80;
}

pInteger->SetStringValue
(
pInteger,
hash.Value,
hash.Length
);
}
}

pInteger->SetStringValue
(
pInteger,
hash.Value,
hash.Length
);
}
}

/*
* If subKeyIden extension is required;
*/
Expand Down
Loading
Loading