svn rev #22860: trunk/src/lib/krb5/krb/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Oct 6 12:36:34 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22860
Commit By: ghudson
Log Message:
In krb5_encrypt_helper, return ENOMEM instead of 0 if we can't
allocate the ciphertext buffer.



Changed Files:
U   trunk/src/lib/krb5/krb/enc_helper.c
Modified: trunk/src/lib/krb5/krb/enc_helper.c
===================================================================
--- trunk/src/lib/krb5/krb/enc_helper.c	2009-10-06 16:20:19 UTC (rev 22859)
+++ trunk/src/lib/krb5/krb/enc_helper.c	2009-10-06 16:36:34 UTC (rev 22860)
@@ -38,7 +38,7 @@
 
     cipher->ciphertext.length = enclen;
     if ((cipher->ciphertext.data = (char *) malloc(enclen)) == NULL)
-	return(ret);
+	return(ENOMEM);
     ret = krb5_c_encrypt(context, key, usage, 0, plain, cipher);
     if (ret) {
 	free(cipher->ciphertext.data);




More information about the cvs-krb5 mailing list