commit | 58ad13c05daf619f77f2d7ad943c62a2c905bc33 | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Tue Jun 05 17:46:53 2012 -0700 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Tue Jun 05 18:06:00 2012 -0700 |
tree | f0f1a4a1192e6ca93354c61bd6b87502800387ad | |
parent | 8e2420edb17b89ab5f5a0f7056ec7fdcc0c18943 [diff] |
BlockRandomAccessSparseMatrix::IntPairToLong suffers from integer overflow. Even though the return value of this function is a long int, the computation happens with three ints, which causes an overflow before the upgrade happens. The fix is to upgrade the constant used int his computation to be a long int, which causes the computation to be done in longs instead of ints. A test has been added to verify that the fix works. Change-Id: Ibb0aef877125bb37ca28754cb07b8e1627fd1d5a