Fix a null pointer access in Tuner VTS

With Vts suite "11_r4/7337463”, meet a crash issue when run case "PerInstance/TunerRecordHidlTest#LnbRecordDataFlowWithTsRecordFilterTest/0_default".
The crash is introduced by 7402e02ebc

The "mLnbId" is a null pointer but it does "*mLnbId = ids[0];" which will obviously lead to crash.
After changing to "mLnbId = &ids[0];", all cases can PASS.

Bug: 189974145
Change-Id: Ic593bfd00fa53365af4bbfeb7512e392f516468c
This commit is contained in:
shla
2021-06-03 22:47:40 -07:00
committed by Jay Patel
parent 9edfd34da9
commit 517aab51c9

View File

@@ -221,7 +221,7 @@ void TunerRecordHidlTest::recordSingleFilterTestWithLnb(FilterConfig filterConf,
return;
}
ASSERT_TRUE(mLnbTests.openLnbById(ids[0]));
*mLnbId = ids[0];
mLnbId = &ids[0];
ASSERT_TRUE(mLnbTests.setLnbCallback());
ASSERT_TRUE(mLnbTests.setVoltage(lnbConf.voltage));
ASSERT_TRUE(mLnbTests.setTone(lnbConf.tone));