From: Greg Hudson Date: Mon, 9 Dec 2019 16:33:57 +0000 (-0500) Subject: Fix error return case in serialization code X-Git-Tag: krb5-1.18-beta1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82d7ffb07c81aefeabf67c7c066070efbc34400b;p=thirdparty%2Fkrb5.git Fix error return case in serialization code One of the changes in commit 81e47875e3de0e52fbb11d61ef30a9406497af73 unintentionally caused the return value of profile_ser_externalize() to be ignored. --- diff --git a/src/lib/krb5/krb/ser_ctx.c b/src/lib/krb5/krb/ser_ctx.c index 80cd05640c..9d5f9dedfa 100644 --- a/src/lib/krb5/krb/ser_ctx.c +++ b/src/lib/krb5/krb/ser_ctx.c @@ -204,8 +204,11 @@ k5_externalize_context(krb5_context context, return (kret); /* Finally, handle profile, if appropriate */ - if (context->profile != NULL) + if (context->profile != NULL) { kret = profile_ser_externalize(NULL, context->profile, &bp, &remain); + if (kret) + return (kret); + } /* * If we were successful, write trailer then update the pointer and