]> git.codecow.com Git - Monocypher.git/commit
Corrected undefined behaviour in kex tests
authorLoup Vaillant <loup@loup-vaillant.fr>
Mon, 4 Mar 2019 22:20:28 +0000 (23:20 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Mon, 4 Mar 2019 22:20:28 +0000 (23:20 +0100)
commit536ef93eff3299f52dc4bbf24d672d81c83b94d3
tree2abbc7157a50b1422f88d36185c29af87ac5a506
parent881a87395750da4ce167cf9523c85b905d713302
Corrected undefined behaviour in kex tests

Calling those functions again on the same status not only does not make
any sense, it can grow the transcript beyond its maximum size of 128
bytes, which triggers a buffer overflow.  We needed to save the context
so we could re-run the relevant function where we left of.

It's the second time the TIS interpreter finds a bug that the other
sanitisers didn't.
tests/test.c