diff options
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/chips/p9/utils/imageProcs/p9_tor.C | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C index 3687237c0..a19afeaf7 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_tor.C +++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C @@ -978,6 +978,7 @@ int tor_get_ring( void* if (i_magic == P9_XIP_MAGIC_HW) { + uint8_t dd_check = 0; ddLevelCount = *((uint32_t*)i_ringSectionPtr + 0); ddLevelCount = htobe32(ddLevelCount); @@ -1008,9 +1009,16 @@ int tor_get_ring( void* local = local + 1; temp1 = *((uint32_t*)i_ringSectionPtr + local); temp1 = htobe32(temp1); + dd_check = 1; break; } } + + if(!dd_check) + { + MY_INF(" invalid DD level input \n"); + return IMGBUILD_TGR_DD_LVL_INFO_NOT_FOUND; + } } else if( i_magic == P9_XIP_MAGIC_SEEPROM) { @@ -1813,4 +1821,4 @@ int tor_get_block_of_rings ( void* i_ringSectionPt, return rc; } -}; +};
\ No newline at end of file |