Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.
/ rdk-aamp Public archive

Commit 5ea5ca9

Browse files
deepan_ragunathanPaulpandian Mariappan
deepan_ragunathan
authored and
Paulpandian Mariappan
committed
DELIA-57909: [Coverity] Various Uninitialized scalar variable in aamp code
Reason for change: Coverity issues are addressed as requested from security team. Signed-off-by: Deepan Ragunathan <[email protected]> Change-Id: Iac795f5b8619f4d93db5d611c1760df7ca36fba4 (cherry picked from commit b91edb7)
1 parent 36b694c commit 5ea5ca9

5 files changed

+5
-5
lines changed

AampConfig.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ bool AampConfig::ProcessConfigJson(const cJSON *cfgdata, ConfigPriority owner )
991991
{
992992
AAMPLOG_WARN("Parsed value for property DrmConfig");
993993
cJSON *subitem = drmConfig->child;
994-
DRMSystems drmType;
994+
DRMSystems drmType = eDRM_PlayReady;
995995
while( subitem )
996996
{
997997
std::string conv = std::string(subitem->valuestring);

drm/ClearKeyDrmSession.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ int ClearKeySession::decrypt(GstBuffer* keyIDBuffer, GstBuffer* ivBuffer, GstBuf
354354
uint32_t nBytesEncrypted = 0;
355355

356356
GstMapInfo ivMap;
357-
GstMapInfo subsampleMap;
357+
GstMapInfo subsampleMap = GST_MAP_INFO_INIT;
358358
GstMapInfo bufferMap;
359359
GstByteReader* reader = NULL;
360360

fragmentcollector_hls.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3608,7 +3608,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void)
36083608
AAMPStatusType retval = eAAMPSTATUS_OK;
36093609
bool startTimeAvailable = true;
36103610
bool syncedUsingSeqNum = false;
3611-
long long mediaSequenceNumber[AAMP_TRACK_COUNT];
3611+
long long mediaSequenceNumber[AAMP_TRACK_COUNT] = {0};
36123612
TrackState *audio = trackState[eMEDIATYPE_AUDIO];
36133613
TrackState *video = trackState[eMEDIATYPE_VIDEO];
36143614
TrackState *subtitle = trackState[eMEDIATYPE_SUBTITLE];

fragmentcollector_mpd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11237,7 +11237,7 @@ void StreamAbstractionAAMP_MPD::ParseAvailablePreselections(IMPDElement *period,
1123711237
std::string codec;
1123811238
std::string lang;
1123911239
std::string tag ;
11240-
long bandwidth;
11240+
long bandwidth = 0;
1124111241
std::string role;
1124211242
int channel = 0;
1124311243
std::string label;

tsprocessor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,7 @@ bool TSProcessor::processStartCode(unsigned char *buffer, bool& keepScanning, in
26772677
{
26782678
unsigned char *newBuff = 0;
26792679
int newSize = m_emulationPreventionCapacity * 2 + length;
2680-
newBuff = (unsigned char *)malloc(newSize*sizeof(char));
2680+
newBuff = (unsigned char *)calloc(newSize,sizeof(char));
26812681
if (!newBuff)
26822682
{
26832683
ERROR("Error: unable to allocate emulation prevention buffer");

0 commit comments

Comments
 (0)