From: ggn Date: Sun, 19 Jun 2022 20:16:23 +0000 (+0300) Subject: Fix for #203. Thanks to Steven Tattersall for the report. X-Git-Tag: v2.2.4~1 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=bf44dfb197d49826c0bfefa3380609a1dbbbf963 Fix for #203. Thanks to Steven Tattersall for the report. --- 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 {