Possible out-of-bounds array access in LDT_paramMaskCheckMod.F90 if fill radius > number of columns #1532
Unanswered
s-scherrer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I recently tried to run LDT on an extremely small domain (2x2 pixels) with an ldt.config file I have used previously with a larger domain. In this case, the "fill radius" option for one of the parameters happened to be larger than the number of columns, which lead to unexpected behaviour due to an out of bounds array access in this part of the source code:
LISF/ldt/core/LDT_paramMaskCheckMod.F90
Lines 397 to 409 in ad06930
If
fill_rad > pnc
, it can happen that in line 406pnc + ix < 1
orix - pnc > pnc
, which can lead to out of bounds access inparam_value
.A simple workaround is to reduce the fill radius, but I think a proper fix would be good. The same code fragment can be multiple times in LDT_paramMaskCheckMod.F90.
Best regards,
Samuel
Beta Was this translation helpful? Give feedback.
All reactions