diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-12-14 11:37:15 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-12-14 12:51:40 +0000 |
commit | 25ee437eb784a8eb241b9463e79dad429b60e933 (patch) | |
tree | bb0b66f88008e73b8b1f40f3ed36763d06a2b5f9 /fitz/fitz-internal.h | |
parent | df835b0f23b4976b453d3bdd63c60804b2376c16 (diff) | |
download | mupdf-25ee437eb784a8eb241b9463e79dad429b60e933.tar.xz |
Bug 693503: Fix SEGV/memory problems in AES.
If an illegal keysize is passed into the AES crypt filter, we
currently exit without setting up the AES context. This causes
us to fail in all manner of ways later on.
We now return failure and callers throw an exception.
This appears to solve all the SEGVs and memory exceptions found in
crypt_aes by Mateusz "j00ru" Jurczyk and Gynvael Coldwind of the
Google Security Team using Address Sanitizer. Many thanks!
Diffstat (limited to 'fitz/fitz-internal.h')
-rw-r--r-- | fitz/fitz-internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h index c90474dd..0de2e4c2 100644 --- a/fitz/fitz-internal.h +++ b/fitz/fitz-internal.h @@ -393,8 +393,8 @@ struct fz_aes_s unsigned long buf[68]; /* unaligned data */ }; -void aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize ); -void aes_setkey_dec( fz_aes *ctx, const unsigned char *key, int keysize ); +int aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize ); +int aes_setkey_dec( fz_aes *ctx, const unsigned char *key, int keysize ); void aes_crypt_cbc( fz_aes *ctx, int mode, int length, unsigned char iv[16], const unsigned char *input, |