C6474 required changes
[keystone-rtos/ibl.git] / src / interp / blob / blob.c
index ab95e39c4ce51937e304539a899d6c38f3e8d106..e92636cc07c045157ee4ac6948a8200e535823e2 100644 (file)
@@ -52,6 +52,9 @@ void iblBootBlob (BOOT_MODULE_FXN_TABLE *bootFxn, Uint32 *entry, void *formatPar
         if (dataSize < 0)
             break;
 
+        if (dataSize > remainSize)
+            dataSize = remainSize;
+
         if (dataSize > 0)  {
 
             (*bootFxn->read)(datap, dataSize);