diff options
Diffstat (limited to 'third_party/heimdal/lib/krb5/aes-test.c')
-rw-r--r-- | third_party/heimdal/lib/krb5/aes-test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/heimdal/lib/krb5/aes-test.c b/third_party/heimdal/lib/krb5/aes-test.c index 01522dd593a..2d048e426e5 100644 --- a/third_party/heimdal/lib/krb5/aes-test.c +++ b/third_party/heimdal/lib/krb5/aes-test.c @@ -328,7 +328,8 @@ krb_enc(krb5_context context, } if (decrypt.length != clear->length || - memcmp(decrypt.data, clear->data, decrypt.length) != 0) { + (decrypt.length && + memcmp(decrypt.data, clear->data, decrypt.length) != 0)) { krb5_warnx(context, "clear text not same"); return EINVAL; } @@ -568,7 +569,8 @@ krb_enc_mit(krb5_context context, return ret; if (decrypt.length != clear->length || - memcmp(decrypt.data, clear->data, decrypt.length) != 0) { + (decrypt.length && + memcmp(decrypt.data, clear->data, decrypt.length) != 0)) { krb5_warnx(context, "clear text not same"); return EINVAL; } |