linbox icon indicating copy to clipboard operation
linbox copied to clipboard

Fix the size formula for an allocation

Open musicinmybrain opened this issue 1 year ago • 0 comments

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.

musicinmybrain avatar Oct 20 '23 12:10 musicinmybrain