pull up r21927, r21928, r21940, r21969, r21981, r22004 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 13 Apr 2009 20:26:35 +0000 (20:26 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 13 Apr 2009 20:26:35 +0000 (20:26 +0000)
commitc52cfef9abd88edc151fd3ec7cb2467db740fbe8
treed22b29d03778f536a014523e75b349277ac1d4dc
parenta28632383c9182ecad2e1a9f70b218057a667833
pull up r21927, r21928, r21940, r21969, r21981, r22004 from trunk

------------------------------------------------------------------------
r22004 | ghudson | 2009-02-13 17:05:48 -0500 (Fri, 13 Feb 2009) | 3 lines
Changed paths:
   M /trunk/src/lib/krb5/asn.1/asn1_k_decode.c
   M /trunk/src/lib/krb5/asn.1/asn1_k_decode.h
   M /trunk/src/lib/krb5/asn.1/krb5_decode.c

Correct numerous memory leaks on error conditions in the ASN.1
decoder functions.

------------------------------------------------------------------------
r21981 | ghudson | 2009-02-12 13:21:33 -0500 (Thu, 12 Feb 2009) | 4 lines
Changed paths:
   M /trunk/src/lib/krb5/asn.1/asn1_encode.c
   M /trunk/src/lib/krb5/asn.1/asn1buf.c

Modify asn12krb5_buf and asn1_do_full_encode to make output parameter
values well-defined on error.  Clean up memory handling and an unused
variable in asn1_do_full_encode.

------------------------------------------------------------------------
r21969 | ghudson | 2009-02-11 15:18:43 -0500 (Wed, 11 Feb 2009) | 6 lines
Changed paths:
   M /trunk/src/include/k5-int.h
   M /trunk/src/lib/krb5/krb/kfree.c
   M /trunk/src/lib/krb5/libkrb5.exports

Ensure we have a free function for every data type we have an ASN.1
decoder for.  Export the new free functions, but only declare them
in k5-int.h since they shouldn't be needed by applications.  Also
export a couple of encoder and decoder functions not previously
exported.

------------------------------------------------------------------------
r21940 | ghudson | 2009-02-09 21:01:58 -0500 (Mon, 09 Feb 2009) | 5 lines
Changed paths:
   M /trunk/src/lib/krb5/asn.1/krb5_decode.c

Adjust the structure of krb5_decode.c functions to initialize output
parameters to NULL and not set them to the real values until a
successful return is guaranteed.  Also fix get_eoc which was returning
without clean_return.

------------------------------------------------------------------------
r21928 | ghudson | 2009-02-09 16:25:53 -0500 (Mon, 09 Feb 2009) | 4 lines
Changed paths:
   M /trunk/src/lib/krb5/asn.1/asn1buf.c
   M /trunk/src/lib/krb5/asn.1/asn1buf.h
   M /trunk/src/lib/krb5/asn.1/krb5_encode.c

Make asn1buf_destroy return void, since it's a free function.  In
krb5_encode.c functions, make *code well-defined in case of error,
and clean up some memory leaks.

------------------------------------------------------------------------
r21927 | ghudson | 2009-02-09 16:23:00 -0500 (Mon, 09 Feb 2009) | 3 lines
Changed paths:
   M /trunk/src/lib/krb5/asn.1/asn1_k_encode.c

In asn1_k_encode.c, stop inconsistently destroying buf on some errors.
It belongs to the caller.

ticket: 6425
version_fixed: 1.7

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22207 dc483132-0cff-0310-8789-dd5450dbe970
src/include/k5-int.h
src/lib/krb5/asn.1/asn1_encode.c
src/lib/krb5/asn.1/asn1_k_decode.c
src/lib/krb5/asn.1/asn1_k_decode.h
src/lib/krb5/asn.1/asn1_k_encode.c
src/lib/krb5/asn.1/asn1buf.c
src/lib/krb5/asn.1/asn1buf.h
src/lib/krb5/asn.1/krb5_decode.c
src/lib/krb5/asn.1/krb5_encode.c
src/lib/krb5/krb/kfree.c
src/lib/krb5/libkrb5.exports