aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/heimdal/kadmin/server.c4
-rw-r--r--crypto/heimdal/lib/kadm5/marshall.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/crypto/heimdal/kadmin/server.c b/crypto/heimdal/kadmin/server.c
index 256c2bac89b7..2800a2e1fc29 100644
--- a/crypto/heimdal/kadmin/server.c
+++ b/crypto/heimdal/kadmin/server.c
@@ -516,7 +516,9 @@ handle_v5(krb5_context contextp,
ret = krb5_read_priv_message(contextp, ac, &fd, &params);
if(ret)
krb5_err(contextp, 1, ret, "krb5_read_priv_message");
- _kadm5_unmarshal_params(contextp, &params, &realm_params);
+ ret = _kadm5_unmarshal_params(contextp, &params, &realm_params);
+ if(ret)
+ krb5_err(contextp, 1, ret, "Could not read or parse kadm5 parameters");
}
initial = ticket->ticket.flags.initial;
diff --git a/crypto/heimdal/lib/kadm5/marshall.c b/crypto/heimdal/lib/kadm5/marshall.c
index 65804afbf92b..38b9855021b2 100644
--- a/crypto/heimdal/lib/kadm5/marshall.c
+++ b/crypto/heimdal/lib/kadm5/marshall.c
@@ -335,8 +335,12 @@ _kadm5_unmarshal_params(krb5_context context,
goto out;
params->mask = mask;
- if(params->mask & KADM5_CONFIG_REALM)
+ if (params->mask & KADM5_CONFIG_REALM) {
ret = krb5_ret_string(sp, &params->realm);
+ if (params->realm == NULL) {
+ ret = EINVAL;
+ }
+ }
out:
krb5_storage_free(sp);