From 02f3727d87a15d497a1bdf973f5fe44db8ab8565 Mon Sep 17 00:00:00 2001 From: qiuweibin <354238065@qq.com> Date: Tue, 11 Mar 2025 03:38:50 +0000 Subject: [PATCH] Fix the null reference vulnerability --- src/base/abci/abcOrchestration.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/abci/abcOrchestration.c b/src/base/abci/abcOrchestration.c index 5d12a529b..5b952da11 100644 --- a/src/base/abci/abcOrchestration.c +++ b/src/base/abci/abcOrchestration.c @@ -4444,6 +4444,8 @@ Rwr_ManAddTimeCuts( pManRwr, Abc_Clock() - clk ); // skip persistant nodes if ( Abc_NodeIsPersistant(pNode) ) { + if (!(pGain_res && pGain_ref && pGain_rwr)) + return 0; fprintf(fpt, "%d, %s, %d\n", pNode->Id, "None" , -99); Vec_IntPush((*pGain_res), -99); Vec_IntPush((*pGain_ref), -99); @@ -4453,6 +4455,8 @@ Rwr_ManAddTimeCuts( pManRwr, Abc_Clock() - clk ); // skip the nodes with many fanouts if ( Abc_ObjFanoutNum(pNode) > 1000 ) { + if (!(pGain_res && pGain_ref && pGain_rwr)) + return 0; fprintf(fpt, "%d, %s, %d\n", pNode->Id,"None", -99); Vec_IntPush((*pGain_res), -99); Vec_IntPush((*pGain_ref), -99);