0001-Fixed-out-of-bound-access-in-gmx-spatial.patch
src/gromacs/gmxana/gmx_spatial.cpp | ||
---|---|---|
262 | 262 |
printf("Memory was required for [%f,%f,%f]\n", fr.x[index[i]][XX], fr.x[index[i]][YY], fr.x[index[i]][ZZ]); |
263 | 263 |
exit(1); |
264 | 264 |
} |
265 |
x = static_cast<int>(std::ceil((fr.x[index[i]][XX]-MINBIN[XX])/rBINWIDTH));
|
|
266 |
y = static_cast<int>(std::ceil((fr.x[index[i]][YY]-MINBIN[YY])/rBINWIDTH));
|
|
267 |
z = static_cast<int>(std::ceil((fr.x[index[i]][ZZ]-MINBIN[ZZ])/rBINWIDTH));
|
|
265 |
x = static_cast<int>(std::floor((fr.x[index[i]][XX]-MINBIN[XX])/rBINWIDTH));
|
|
266 |
y = static_cast<int>(std::floor((fr.x[index[i]][YY]-MINBIN[YY])/rBINWIDTH));
|
|
267 |
z = static_cast<int>(std::floor((fr.x[index[i]][ZZ]-MINBIN[ZZ])/rBINWIDTH));
|
|
268 | 268 |
++bin[x][y][z]; |
269 | 269 |
if (x < minx) |
270 | 270 |
{ |
271 |
- |