creachadair / imath

Arbitrary precision integer and rational arithmetic library
Other
129 stars 20 forks source link

Fixes an XCode static analyzer warning. #1

Closed jeroenleenarts closed 11 years ago

jeroenleenarts commented 11 years ago

It seems that there could be a situation where the digits part of the z struct is being reallocated and thus the dz pointer is pointing into deallocated memory.

By extracting the digits pointer after the s_qmul call this is prevented. In our project's set of unit tests the functionality is does not break.

creachadair commented 11 years ago

Thanks!