fentec-project / CiFEr

Functional encryption library in C
Apache License 2.0
78 stars 24 forks source link

Malloc wrapper which aborts on failure #1

Closed janhartman closed 5 years ago

janhartman commented 5 years ago

This PR introduces a function which wraps malloc and aborts if an error is detected. This way of handling malloc's errors is a bit crude compared to returning an error code, but it avoids undefined behaviour and does not introduce unnecessary complications in the library.