[3rd Party] Add buffer offlow check in 7zip
This commit is contained in:
parent
cc5cc265e4
commit
03b032c939
|
@ -65,10 +65,10 @@ static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props)
|
||||||
return SZ_ERROR_UNSUPPORTED;
|
return SZ_ERROR_UNSUPPORTED;
|
||||||
dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop);
|
dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop);
|
||||||
props[0] = (Byte)LZMA2_LCLP_MAX;
|
props[0] = (Byte)LZMA2_LCLP_MAX;
|
||||||
props[1] = (Byte)(dicSize);
|
props[1] = (Byte)((dicSize)& 0xFF);
|
||||||
props[2] = (Byte)(dicSize >> 8);
|
props[2] = (Byte)((dicSize >> 8) & 0xFF);
|
||||||
props[3] = (Byte)(dicSize >> 16);
|
props[3] = (Byte)((dicSize >> 16) & 0xFF);
|
||||||
props[4] = (Byte)(dicSize >> 24);
|
props[4] = (Byte)((dicSize >> 24) & 0xFF);
|
||||||
return SZ_OK;
|
return SZ_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue