RRZE-HPC / stempel

Stencil TEMPlate Engineering Library
GNU Affero General Public License v3.0
6 stars 2 forks source link

Possible overflow in compilable file #19

Closed sguera closed 7 years ago

sguera commented 7 years ago

(double ) (repeat * ((M - 3) * (N - 3)))

may cause integer overflow before converting to double.

Do separate cast to double for each integer before multiplication.

sguera commented 7 years ago

fixed in https://github.com/RRZE-HPC/stempel/commit/77fd77e487beb6a04be4fa84a4a54cca92deb5f4