[1762] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

small errors in get_in_tkt.c

daemon@ATHENA.MIT.EDU (Gary Gaskell)
Thu Dec 28 19:30:54 1995

Date: Fri, 29 Dec 1995 10:30:38 +1000 (EST)
From: Gary Gaskell <gaskell@dstc.edu.au>
To: krb5-bugs@MIT.EDU
Cc: Gary Gaskell <gaskell@dstc.edu.au>


Browsing some code, I found two potential bugs int get_in_tkt.c.  It 
appears that when two routines were commented out, the associated if 
statements for error testing were not commented out.  I don't believe 
that I've seen an error due to this, but as retval is not initialised 
prior to the if statement, it could be a random error.

A context patch is below (beta 5).

regards


Gary Gaskell                         Cooperative Research Centre for
Research Scientist                   Distributed Systems Technology
DSTC                                 Ph:   61 7 3864 1051
Level 12, ITE Building               Fax:  61 7 3864 1282
Queensland University of Technology  Email:  gaskell@dstc.edu.au  
Brisbane, Australia.                 WWW:  http://www.dstc.edu.au
                                     Mobile: 0411 221 946

__________________________________CUT_______________________________
*** get_in_tkt.c	Fri Dec 29 10:19:20 1995
--- get_in_tkt.c.changed	Fri Dec 29 10:18:28 1995
***************
*** 133,140 ****
  	     * realm renaming, or some such, this won't work.
  	     */
  /*    retval = (*key_proc)(context, keytype, &decrypt_key, keyseed, 0); */
  	    if (retval)
! 		    return retval;
  	    request.padata = (krb5_pa_data **) malloc(sizeof(krb5_pa_data *)
  						      * 2);
  	    if (!request.padata) {
--- 133,142 ----
  	     * realm renaming, or some such, this won't work.
  	     */
  /*    retval = (*key_proc)(context, keytype, &decrypt_key, keyseed, 0); */
+ /* this should also be commented out
  	    if (retval)
! 		    return retval; */
! 
  	    request.padata = (krb5_pa_data **) malloc(sizeof(krb5_pa_data *)
  						      * 2);
  	    if (!request.padata) {
***************
*** 145,152 ****
  	  /*  retval = krb5_obtain_padata(context, ptypes[0], creds->client,
  					request.addresses, decrypt_key,
  					&padata); */
! 	    if (retval)
! 		goto cleanup;
  /*	    request.padata[0] = padata; */
  	    request.padata[1] = 0;
      }
--- 147,155 ----
  	  /*  retval = krb5_obtain_padata(context, ptypes[0], creds->client,
  					request.addresses, decrypt_key,
  					&padata); */
! 	    /* this also should be commented out 
! 	if (retval)
! 		goto cleanup; */
  /*	    request.padata[0] = padata; */
  	    request.padata[1] = 0;
      }



home help back first fref pref prev next nref lref last post