From: Ezra Peisach Date: Tue, 26 Jun 2001 20:35:08 +0000 (+0000) Subject: * authorization.c (find_first_cmd_that_exists): Change xmalloc() X-Git-Tag: krb5-1.3-alpha1~1280 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ddacc5bbb368bb88c1e3be611b910494a06444f2;p=krb5.git * authorization.c (find_first_cmd_that_exists): Change xmalloc() to xcalloc() where was intented in code (two arguments to xmalloc). * ksu.h: Provide full prototypes for xmalloc(), xrealloc(), xcalloc(), and xstrdup(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13510 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index ef3f0e895..6b1fe9d43 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,11 @@ +2001-06-26 Ezra Peisach + + * authorization.c (find_first_cmd_that_exists): Change xmalloc() + to xcalloc() where was intented in code (two arguments to xmalloc). + + * ksu.h: Provide full prototypes for xmalloc(), xrealloc(), + xcalloc(), and xstrdup(). + 2001-06-21 Ezra Peisach * main.c (get_params): Change optind to optindex to prevent diff --git a/src/clients/ksu/authorization.c b/src/clients/ksu/authorization.c index 6d98a78b9..67cc78776 100644 --- a/src/clients/ksu/authorization.c +++ b/src/clients/ksu/authorization.c @@ -517,7 +517,7 @@ krb5_boolean find_first_cmd_that_exists(fcmd_arr, cmd_out, err_out) } if (retbool == FALSE ){ - err = (char *) xmalloc((80 + (max_ln+2)*i) ,sizeof(char)); + err = (char *) xcalloc((80 + (max_ln+2)*i) ,sizeof(char)); strcpy(err,"Error: not found -> "); for(j= 0; j < i; j ++){ strcat(err, " "); diff --git a/src/clients/ksu/ksu.h b/src/clients/ksu/ksu.h index c8c21ed99..f0623cc4f 100644 --- a/src/clients/ksu/ksu.h +++ b/src/clients/ksu/ksu.h @@ -246,8 +246,10 @@ extern krb5_error_code ksu_tgtname PROTOTYPE((krb5_context, const krb5_data *, extern char *krb5_lname_file; /* Note: print this out just be sure that it gets set */ -extern void *xmalloc (), *xrealloc (), *xcalloc(); -extern char *xstrdup (); +extern void *xmalloc PROTOTYPE((size_t)), + *xrealloc PROTOTYPE((void *, size_t)), + *xcalloc PROTOTYPE((size_t, size_t)); +extern char *xstrdup PROTOTYPE((const char *)); #ifndef HAVE_UNSETENV void unsetenv PROTOTYPE((char *));