summaryrefslogtreecommitdiffstats
path: root/src/map/amap/amapPerm.c
diff options
context:
space:
mode:
authorBaruch Sterin <baruchs@gmail.com>2012-02-23 11:11:21 -0800
committerBaruch Sterin <baruchs@gmail.com>2012-02-23 11:11:21 -0800
commit871684d2a03708315b5e067a294dbba9608f2766 (patch)
tree6675db77002ee2994f7f29e75af07e522b2d4cbc /src/map/amap/amapPerm.c
parentb879786e73220e835aed1673ff9f9abaadf73d4e (diff)
parent99e7d1d19357acf9d317d3beababe48d709a7020 (diff)
downloadabc-871684d2a03708315b5e067a294dbba9608f2766.tar.gz
abc-871684d2a03708315b5e067a294dbba9608f2766.tar.bz2
abc-871684d2a03708315b5e067a294dbba9608f2766.zip
pyabc changes with main branch
Diffstat (limited to 'src/map/amap/amapPerm.c')
-rw-r--r--src/map/amap/amapPerm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/amap/amapPerm.c b/src/map/amap/amapPerm.c
index 8af42ca3..7c471ca4 100644
--- a/src/map/amap/amapPerm.c
+++ b/src/map/amap/amapPerm.c
@@ -159,8 +159,15 @@ Vec_Int_t * Amap_LibDeriveGatePerm_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * pNtk,
iDsdLit = 0;
Vec_IntForEachEntry( vNodFanin, iNodFanin, k )
{
- if ( iNodFanin == 0 && iDsdLit < Vec_IntSize(vDsdLits) )
+ if ( iNodFanin == 0 )
{
+ if ( iDsdLit >= Vec_IntSize(vDsdLits) )
+ {
+ Vec_IntFree( vPerm );
+ Vec_IntFree( vDsdLits );
+ Vec_IntFree( vNodFanin );
+ return NULL;
+ }
iDsdFanin = Vec_IntEntry( vDsdLits, iDsdLit++ );
Vec_IntPush( vPerm, iDsdFanin );
continue;