Check return value of krb5int_copy_data_contents in preauth2.c's
authorGreg Hudson <ghudson@mit.edu>
Fri, 10 Apr 2009 19:50:55 +0000 (19:50 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 10 Apr 2009 19:50:55 +0000 (19:50 +0000)
pa_salt.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22189 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/preauth2.c

index 73f4e79b613b95c226536bbd39aa17d604b3c477..ed4708e1bfffe320378684a8fe40e682731c81eb 100644 (file)
@@ -634,10 +634,13 @@ krb5_error_code pa_salt(krb5_context context,
                        krb5_gic_get_as_key_fct gak_fct, void *gak_data)
 {
     krb5_data tmp;
+    krb5_error_code retval;
 
     tmp = padata2data(*in_padata);
     krb5_free_data_contents(context, salt);
-    krb5int_copy_data_contents(context, &tmp, salt);
+    retval = krb5int_copy_data_contents(context, &tmp, salt);
+    if (retval)
+       return retval;
 
     if (in_padata->pa_type == KRB5_PADATA_AFS3_SALT)
        salt->length = SALT_TYPE_AFS_LENGTH;