(_warnerr): handle the case of an illegal error code
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3714 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -60,8 +60,15 @@ _warnerr(krb5_context context, int doexit, int eval, int do_errtext,
|
|||||||
*arg++ = msg;
|
*arg++ = msg;
|
||||||
}
|
}
|
||||||
if(context && do_errtext){
|
if(context && do_errtext){
|
||||||
|
const char *err_msg;
|
||||||
|
|
||||||
strcat(xfmt, "%s");
|
strcat(xfmt, "%s");
|
||||||
*arg++ = krb5_get_err_text(context, code);
|
|
||||||
|
err_msg = krb5_get_err_text(context, code);
|
||||||
|
if (err_msg)
|
||||||
|
*arg++ = err_msg;
|
||||||
|
else
|
||||||
|
*arg++ = "<unknown error>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(context && context->warn_dest)
|
if(context && context->warn_dest)
|
||||||
|
|||||||
Reference in New Issue
Block a user