diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-18 14:22:33 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-18 14:22:33 +0200 |
commit | ac1bb3e5b3349bf744c3905fec55295e6bb024ab (patch) | |
tree | 5b6c21b48cb6db6fb1ec935bebeebf3a57a7148d /unsupported/Eigen/MPRealSupport | |
parent | da62eb22e497d864ccaed93907818a384bad8e2a (diff) |
bug #770: fix out of bounds access
Diffstat (limited to 'unsupported/Eigen/MPRealSupport')
-rw-r--r-- | unsupported/Eigen/MPRealSupport | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unsupported/Eigen/MPRealSupport b/unsupported/Eigen/MPRealSupport index 35d77e5bd..8e22b13c7 100644 --- a/unsupported/Eigen/MPRealSupport +++ b/unsupported/Eigen/MPRealSupport @@ -157,6 +157,9 @@ int main() void operator()(mpreal* res, Index resStride, const mpreal* blockA, const mpreal* blockB, Index rows, Index depth, Index cols, mpreal alpha, Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0) { + if(rows==0 || cols==0 || depth==0) + return; + mpreal acc1(0,mpfr_get_prec(blockA[0].mpfr_srcptr())), tmp (0,mpfr_get_prec(blockA[0].mpfr_srcptr())); |