From: Ken Raeburn Date: Sat, 13 May 2006 06:41:37 +0000 (+0000) Subject: * main.c (initialize_realms): Use precise size allocation for dbname= parameter X-Git-Tag: krb5-1.5-alpha1~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3ea7ca48f21b0ce9e5acf81eecd578fadbe4bcf;p=krb5.git * main.c (initialize_realms): Use precise size allocation for dbname= parameter git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18007 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/main.c b/src/kdc/main.c index d03b81e03..7bdc96033 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -503,7 +503,7 @@ initialize_realms(krb5_context kcontext, int argc, char **argv) /* now db_name is not a seperate argument. It has to be passed as part of the db_args */ if( db_name == NULL ) { - db_name = malloc(1025); + db_name = malloc(sizeof("dbname=") + strlen(optarg)); if( db_name == NULL ) { fprintf(stderr,"%s: KDC cannot initialize. Not enough memory\n",