From e20b7ae7457cc6016f57cb66be2652afb72eb14d Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Tue, 25 Mar 2008 23:50:09 +0000 Subject: [PATCH] fix: diseqc.eDVBDiseqcCommand::data[n] is used uninitialized in this function --- lib/dvb/sec.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 655f64fc..1e75d113 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -550,6 +550,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA for ( int i = 0; i < loops;) // fill commands... { eDVBDiseqcCommand diseqc; + memset(diseqc.data, 0, MAX_DISEQC_LENGTH); diseqc.len = 4; diseqc.data[0] = i ? 0xE1 : 0xE0; diseqc.data[1] = 0x10; @@ -637,6 +638,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BETWEEN_SWITCH_AND_MOTOR_CMD]) ); // wait 700ms when diseqc changed eDVBDiseqcCommand diseqc; + memset(diseqc.data, 0, MAX_DISEQC_LENGTH); diseqc.len = 3; diseqc.data[0] = 0xE0; diseqc.data[1] = 0x31; // positioner -- 2.30.2