linbox
linbox copied to clipboard
Fix the size formula for an allocation
Fixes #304 by adding one byte to the allocated size, based on the rationale offered by Jerry James, @jamesjer, in https://github.com/linbox-team/linbox/issues/304.
In addition, a new local variable is introduced for the size in question to reduce repetition.
I tested this with -D_FORTIFY_SOURCE=3
and confirmed that the tests pass.