]> git.codecow.com Git - Monocypher.git/commit
Don't try to malloc() zero bytes
authorLoup Vaillant <loup@loup-vaillant.fr>
Tue, 19 Jun 2018 22:53:37 +0000 (00:53 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Tue, 19 Jun 2018 22:53:37 +0000 (00:53 +0200)
commit65a1bac8d5944c0584e56c9915bdbbd5e037cb1e
treedc0c8fc46a0cf31fc70941812e8caa622141592a
parent278c97d778ad68fdbd42a425747ab3b612296ecc
Don't try to malloc() zero bytes

Some platforms refuse to allocate zero bytes.  This causes the entire
test suite to fail miserably.

To avoid this, we now fake success, and return the NULL pointer.  It
won't be dereferenced anyway.
tests/test.c