summaryrefslogtreecommitdiff
path: root/fitz/filt_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/filt_basic.c')
-rw-r--r--fitz/filt_basic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fitz/filt_basic.c b/fitz/filt_basic.c
index db95533d..6f07edd6 100644
--- a/fitz/filt_basic.c
+++ b/fitz/filt_basic.c
@@ -653,7 +653,8 @@ fz_open_aesd(fz_stream *chain, unsigned char *key, unsigned keylen)
{
state = fz_malloc_struct(ctx, fz_aesd);
state->chain = chain;
- aes_setkey_dec(&state->aes, key, keylen * 8);
+ if (aes_setkey_dec(&state->aes, key, keylen * 8))
+ fz_throw(ctx, "AES key init failed (keylen=%d)", keylen * 8);
state->ivcount = 0;
state->rp = state->bp;
state->wp = state->bp;