Merge pull request #384 from QiuYitai/master

Fix the null reference vulnerability
This commit is contained in:
alanminko 2025-04-01 20:35:09 +07:00 committed by GitHub
commit a4d6775b7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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);