summaryrefslogtreecommitdiff
path: root/crypto/heimdal/kadmin/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/kadmin/server.c')
-rw-r--r--crypto/heimdal/kadmin/server.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/heimdal/kadmin/server.c b/crypto/heimdal/kadmin/server.c
index 0bda03ce11da5..143e95d96fa40 100644
--- a/crypto/heimdal/kadmin/server.c
+++ b/crypto/heimdal/kadmin/server.c
@@ -34,7 +34,7 @@
#include "kadmin_locl.h"
#include <krb5-private.h>
-RCSID("$Id: server.c,v 1.34 2002/05/24 15:23:42 joda Exp $");
+RCSID("$Id: server.c,v 1.36 2002/09/10 19:23:28 joda Exp $");
static kadm5_ret_t
kadmind_dispatch(void *kadm_handle, krb5_boolean initial,
@@ -255,6 +255,13 @@ kadmind_dispatch(void *kadm_handle, krb5_boolean initial,
krb5_free_principal(context->context, princ);
goto fail;
}
+ /* n_key_data will be squeezed into an int16_t below. */
+ if (n_key_data < 0 || n_key_data >= 1 << 16 ||
+ n_key_data > UINT_MAX/sizeof(*key_data)) {
+ ret = ERANGE;
+ krb5_free_principal(context->context, princ);
+ goto fail;
+ }
key_data = malloc (n_key_data * sizeof(*key_data));
if (key_data == NULL) {
@@ -440,7 +447,7 @@ v5_loop (krb5_context context,
}
static krb5_boolean
-match_appl_version(void *data, const char *appl_version)
+match_appl_version(const void *data, const char *appl_version)
{
unsigned minor;
if(sscanf(appl_version, "KADM0.%u", &minor) != 1)