diff options
| author | Egor Tensin <egor@tensin.name> | 2026-07-22 21:58:13 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-07-22 21:58:13 +0200 |
| commit | 002dab0e98ad5979733c0d0c5c34b71a03a5d452 (patch) | |
| tree | 7714a55687d9beffe758b9cdd94c9c0367455760 /aes/src/box.c | |
| parent | rewrite: sort out and modernize Boost.Program_Options usage (diff) | |
| download | aes-tools-002dab0e98ad5979733c0d0c5c34b71a03a5d452.tar.gz aes-tools-002dab0e98ad5979733c0d0c5c34b71a03a5d452.zip | |
rewrite: aes: sort out error handling in most spots
Diffstat (limited to 'aes/src/box.c')
| -rw-r--r-- | aes/src/box.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/aes/src/box.c b/aes/src/box.c index e4750dc..c62edec 100644 --- a/aes/src/box.c +++ b/aes/src/box.c @@ -139,6 +139,13 @@ AES_StatusCode aes_box_encrypt_block( AES_Block* output, AES_ErrorDetails* err_details ) { + if (box == NULL) + return aes_error_null_argument(err_details, "box"); + if (input == NULL) + return aes_error_null_argument(err_details, "input"); + if (output == NULL) + return aes_error_null_argument(err_details, "output"); + return aes_box_encrypt_block_in_mode[box->mode](box, input, output, err_details); } |
