summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/Common/Decompress.c
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C/Common/Decompress.c')
-rw-r--r--BaseTools/Source/C/Common/Decompress.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c
index a87e806961..ed08545918 100644
--- a/BaseTools/Source/C/Common/Decompress.c
+++ b/BaseTools/Source/C/Common/Decompress.c
@@ -662,6 +662,12 @@ Returns: (VOID)
BytesRemain--;
}
+ //
+ // Once mOutBuf is fully filled, directly return
+ //
+ if (Sd->mOutBuf >= Sd->mOrigSize) {
+ return ;
+ }
}
}