Closed SebastianoGuer closed 8 months ago
@SebastianoGuer Concerning the last issue you raised, I fixed the refpass_step macro. Although it seems that there was no incorrect code behavior, I agree that the code was quite confusing as it was written. As for the first issue, I cannot address it without more information from you. Please open a new GitHub issue for this specific problem with a reproducer that causes a failure. As for the second issue involving alloca, this is not a bug. alloca cannot return null. An allocation failure results in a stack overflow crash. Since alloca is only used to workaround bugs in the MSVC compiler, it would be better for Microsoft to fix their compiler instead of adding more uglyness to the JasPer code.
In source jas_icc.c, function jas_icclut8_output the statements: lut8->clut = 0; lut8->intabsbuf = 0; lut8->outtabsbuf = 0; always provoke memory violation in the following statements: if (jas_iccputuint8(out, lut8->intabsbuf[i])) { if (jas_iccputuint8(out, lut8->outtabsbuf[i])) { if (jas_iccputuint8(out, lut8->clut[i])) {
In source jas_image.c the following is missing:
ifdef _MSC_VER
include
endif
Then, after _alloca (two times present; but _malloca should not be better?), the pointer not null test is missing: if (!stack_buffer) return -1;
In source jpc_t1enc.c, macro refpass_step (d) = (dp); \ --> confusion: d is not a macro argument, but a variable declared outside the macro: d = (dp); \