summaryrefslogtreecommitdiff
path: root/src/lib/crypto/krb/s2k_pbkdf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto/krb/s2k_pbkdf2.c')
-rw-r--r--src/lib/crypto/krb/s2k_pbkdf2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/crypto/krb/s2k_pbkdf2.c b/src/lib/crypto/krb/s2k_pbkdf2.c
index ec5856c2be79..1fea03408c76 100644
--- a/src/lib/crypto/krb/s2k_pbkdf2.c
+++ b/src/lib/crypto/krb/s2k_pbkdf2.c
@@ -47,7 +47,7 @@ krb5int_dk_string_to_key(const struct krb5_keytypes *ktp,
keybytes = ktp->enc->keybytes;
keylength = ktp->enc->keylength;
- concatlen = string->length + (salt ? salt->length : 0);
+ concatlen = string->length + salt->length;
concat = k5alloc(concatlen, &ret);
if (ret != 0)
@@ -63,7 +63,7 @@ krb5int_dk_string_to_key(const struct krb5_keytypes *ktp,
if (string->length > 0)
memcpy(concat, string->data, string->length);
- if (salt != NULL && salt->length > 0)
+ if (salt->length > 0)
memcpy(concat + string->length, salt->data, salt->length);
krb5int_nfold(concatlen*8, concat, keybytes*8, foldstring);