From: Alan Cox Date: Mon, 26 Mar 2018 21:11:41 +0000 (+0100) Subject: binman: off by one X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e736445b4b21a8570035ae5a485ecb92bf166f83;p=FUZIX.git binman: off by one --- diff --git a/Kernel/tools/binman.c b/Kernel/tools/binman.c index 26962d2a..b94dd153 100644 --- a/Kernel/tools/binman.c +++ b/Kernel/tools/binman.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) then the compiler will have messed it up. Even though we then copy the initializers into initialized we can only use the space for bss */ - if (s__DISCARD && s__DISCARD + l__DISCARD >= s__INITIALIZER && + if (s__DISCARD && s__DISCARD + l__DISCARD > s__INITIALIZER && s__INITIALIZER + l__INITIALIZED >= s__DISCARD) { fprintf(stderr, "Initializer will have overwritten DISCARD\n"); exit(1);