* authorization.c (find_first_cmd_that_exists): Change xmalloc()
authorEzra Peisach <epeisach@mit.edu>
Tue, 26 Jun 2001 20:35:08 +0000 (20:35 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 26 Jun 2001 20:35:08 +0000 (20:35 +0000)
        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

src/clients/ksu/ChangeLog
src/clients/ksu/authorization.c
src/clients/ksu/ksu.h

index ef3f0e8950626b9f59edfe7214c2a4f7a74b44b8..6b1fe9d43859429f24ec55d168751fbd70955b45 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-26  Ezra Peisach  <epeisach@mit.edu>
+
+       * 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  <epeisach@mit.edu>
 
        * main.c (get_params): Change optind to optindex to prevent
index 6d98a78b97c8ead81b8a2bac7093e57f2be471bd..67cc78776026edb918c7d9f33013f78a824b72dc 100644 (file)
@@ -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, " ");
index c8c21ed996f488479c56a14715dfd03308ba8a06..f0623cc4f0afce6647a867a2172b8891dbf20996 100644 (file)
@@ -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 *));