Avoid malloc(0) in ASN.1 bytestring decode
authorGreg Hudson <ghudson@mit.edu>
Sat, 31 Mar 2012 00:38:16 +0000 (00:38 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 31 Mar 2012 00:38:16 +0000 (00:38 +0000)
commit4ce0974b4d5c37b22ceedb5aa7115eedcfc486ef
tree399b0311b8a02bebf3e40db2eb4964df08ebd8f8
parentad10a94d11676da906feb0d8b9394c5b2ed394aa
Avoid malloc(0) in ASN.1 bytestring decode

In k5_asn1_decode_bytestring, just leave *str_out as NULL if len is 0,
instead of calling malloc(0) and possibly returning a spurious ENOMEM.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25796 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/asn.1/asn1_encode.c