mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-31 15:28:21 -04:00
Version 0.17.6
- corrected extended firmware volume header handling - corrected a rare crash on trying to decompress EFI11-compressed sections with TianoDecompress routine
This commit is contained in:
parent
b3c9466f58
commit
7b2976d92c
2 changed files with 24 additions and 5 deletions
|
@ -255,10 +255,14 @@ for (Char = 0; Char < NumOfChar; Char++) {
|
|||
|
||||
NextCode = (UINT16) (Start[Len] + Weight[Len]);
|
||||
|
||||
if (Len <= TableBits) {
|
||||
if (Len <= TableBits) {
|
||||
|
||||
for (Index = Start[Len]; Index < NextCode; Index++) {
|
||||
Table[Index] = Char;
|
||||
// Check to prevent possible heap corruption
|
||||
if (Index >= (UINT16) (1U << TableBits))
|
||||
return (UINT16)BAD_TABLE;
|
||||
|
||||
Table[Index] = Char;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -643,7 +647,11 @@ for (;;) {
|
|||
BytesRemain = CharC;
|
||||
|
||||
DataIdx = Sd->mOutBuf - DecodeP (Sd) - 1;
|
||||
|
||||
if (DataIdx >= Sd->mOrigSize) {
|
||||
Sd->mBadTableFlag = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
BytesRemain--;
|
||||
while ((INT16) (BytesRemain) >= 0) {
|
||||
Sd->mDstBase[Sd->mOutBuf++] = Sd->mDstBase[DataIdx++];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue