aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-02-11 15:55:36 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-02-11 18:04:36 +0000
commit35919a01caf4a84c204eec0c18720b6efc07bb6d (patch)
treefe733f329bb354bc7cf7a9372892d2879858bbb3 /wsutil
parentf7468aaf5bc62c9fcdbcc01349bdaa442617b526 (diff)
AES: Fix dereference of null pointer
Change-Id: Iddd21c8786e679eef51024a172403200ee6652cb Reviewed-on: https://code.wireshark.org/review/13902 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/aes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wsutil/aes.c b/wsutil/aes.c
index ee910c2b64..fdd5b89896 100644
--- a/wsutil/aes.c
+++ b/wsutil/aes.c
@@ -1258,7 +1258,10 @@ void rijndael_decrypt(
*/
void aes_cmac_encrypt_starts(aes_cmac_ctx *ctx, const guint8 *key, guint key_len)
{
- if (ctx == NULL || key == NULL) {
+ if (ctx == NULL) {
+ return;
+ }
+ if (key == NULL) {
ctx->key_len = 0;
return;
}