X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;fp=sect.c;h=20e6fcb4a32016685d68116e5024272eddcba10a;hp=b20542bbd172c554aa375c1bbb513724112ea3fe;hb=bf44dfb197d49826c0bfefa3380609a1dbbbf963;hpb=e4747b998a04025ea409316ff23cf3b464fd99e8 diff --git a/sect.c b/sect.c index b20542b..20e6fcb 100644 --- a/sect.c +++ b/sect.c @@ -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 {