Skip to content

Commit 464e45d

Browse files
committed
Add constant size check in wp_kdf_krb5kdf_derive
1 parent 2279ebf commit 464e45d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wp_krb5kdf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ static int wp_kdf_krb5kdf_derive(wp_Krb5kdfCtx* ctx, unsigned char* key,
469469
if (ok && (wp_kdf_krb5kdf_expected_key_size(ctx) != (int)ctx->keySz)) {
470470
ok = 0;
471471
}
472+
if (ok && (ctx->constant == NULL || ctx->constantSz == 0)) {
473+
ok = 0;
474+
}
472475
if (ok) {
473476
XMEMSET(key, 0, keyLen);
474477

0 commit comments

Comments
 (0)