summaryrefslogtreecommitdiffstats
path: root/src/crypto.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-01-21 19:07:56 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-01-21 19:07:56 +0100
commit998300562e14f9d07293ec41e1aecca5930d5e6d (patch)
treeb7d6fdaa365aaefa98c39483052bb94064660a28 /src/crypto.c
parent96c3ad683d87918fd0e6451d37934ba8b1d03867 (diff)
downloadfastd-998300562e14f9d07293ec41e1aecca5930d5e6d.tar
fastd-998300562e14f9d07293ec41e1aecca5930d5e6d.zip
Add error message for OOM on buffer alloc
Diffstat (limited to 'src/crypto.c')
-rw-r--r--src/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto.c b/src/crypto.c
index e46f56d..05e7bcd 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -46,7 +46,7 @@ static fastd_crypto_aes128ctr_context_t* aes128ctr_init(fastd_context_t *ctx) {
static fastd_crypto_aes128ctr_state_t* aes128ctr_set_key(fastd_context_t *ctx, const fastd_crypto_aes128ctr_context_t *cctx, const fastd_block128_t *key) {
fastd_crypto_aes128ctr_state_t *cstate = malloc(sizeof(fastd_crypto_aes128ctr_state_t));
- cstate->d = fastd_buffer_alloc(crypto_stream_aes128ctr_BEFORENMBYTES, 0, 0);
+ cstate->d = fastd_buffer_alloc(ctx, crypto_stream_aes128ctr_BEFORENMBYTES, 0, 0);
crypto_stream_aes128ctr_beforenm(cstate->d.data, key->b);
return cstate;