Hello,
there seems to be an array index out of bounds error in the recent GRAMPC (v2.1 and v2.2).
In the file grampc_run.c towards the end of function evaluate_gradp(), the element t[i] is accessed, which is already behind the array bounds. This causes undefined behavior (undefined t values are given to the dVdp function). I guess it should be changed to t[grampc->opt->Nhor-1] (or t[i-1]).
Thanks and kind regards,
Max
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
there seems to be an array index out of bounds error in the recent GRAMPC (v2.1 and v2.2).
In the file grampc_run.c towards the end of function
evaluate_gradp()
, the elementt[i]
is accessed, which is already behind the array bounds. This causes undefined behavior (undefined t values are given to the dVdp function). I guess it should be changed tot[grampc->opt->Nhor-1]
(ort[i-1]
).Thanks and kind regards,
Max
Hello Max,
thanks for the hint! You are right, line 892 in grampc_run.c should be changed from
to
The bugfix will be included in the next version of GRAMPC.
Regards,
Andreas