Fix for #203. Thanks to Steven Tattersall for the report.

This commit is contained in:
ggn 2022-06-19 23:16:23 +03:00 committed by Shamus Hammons
parent e4747b998a
commit bf44dfb197
1 changed files with 3 additions and 0 deletions

3
sect.c
View File

@ -548,6 +548,9 @@ int ResolveFixups(int sno)
// In this instruction the PC is located a DWORD away
if (dw & FU_PCRELX)
eval += 2;
if ((int64_t)eval > 0x7fff || (int64_t)eval < -32768)
error(range_error);
}
else
{