зеркало из https://github.com/mono/ikvm-fork.git
Don't loop infinitely when the RVA lies outside of the file.
This commit is contained in:
Родитель
0f2ade7ce0
Коммит
5de77bb9f7
|
@ -93,6 +93,11 @@ namespace IKVM.Reflection.Reader
|
|||
while (size > 0)
|
||||
{
|
||||
int read = module.stream.Read(data, offset, size);
|
||||
if (read == 0)
|
||||
{
|
||||
// C++ assemblies can have fields that have an RVA that lies outside of the file
|
||||
break;
|
||||
}
|
||||
offset += read;
|
||||
size -= read;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче