[go: up one dir, main page]

If the size of a sequence exceeds 2**31 bit, the requested disk space becomes negative and the processing is aborted.

Siril version: tag 1.4.0-beta4 last commit 3c0504c4 (HEAD -> master, origin/master, origin/HEAD)

Operating System: [Windows? macOS? Linux?] Linux Ubuntu 24.04

Package: [tell us where from]

Description of the bug

If the size of a sequence exceeds 2**31 bit, the requested disk space becomes negative and the processing is aborted. A fix is given below:

diff --git a/src/registration/applyreg.c b/src/registration/applyreg.c index 68d345c9a..d9bcea0f4 100644 --- a/src/registration/applyreg.c +++ b/src/registration/applyreg.c @@ -274,7 +274,7 @@ static gboolean compute_framing(struct registration_args *regargs) { retval = FALSE; } }

  •                   total_Mpix = (double)(n * rx * ry * regargs->output_scale * regargs->output_scale * 1.e-6);
  •                   total_Mpix = (double)(n * (double)rx * (double)ry * regargs->output_scale * regargs->output_scale * 1.e-6);

Expected result:

Actual result:

Additional information

Please provide any backtrace or warnings/error you could have, paste it here.