Closed ShijieYan closed 3 years ago
In https://github.com/fangq/mmc/blob/1e915a6b6bd7b169b40ab4d3ef7955a5426ecf0f/src/tettracing.c#L984, if cfg->tend > (cfg.tstep * cfg->maxgate) r->Lmove could be larger than it is supposed to be, resulting in out of bound photon position and therefore invalid memory access when saving output to grid.
cfg->tend > (cfg.tstep * cfg->maxgate)
In https://github.com/fangq/mmc/blob/1e915a6b6bd7b169b40ab4d3ef7955a5426ecf0f/src/tettracing.c#L984, if
cfg->tend > (cfg.tstep * cfg->maxgate)
r->Lmove could be larger than it is supposed to be, resulting in out of bound photon position and therefore invalid memory access when saving output to grid.