From: Greg Hudson Date: Thu, 16 Jan 2014 16:32:10 +0000 (-0500) Subject: Avoid assertion failure in error_message X-Git-Tag: krb5-1.13-alpha1~244 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bdaa746fec1cf29adcbe5b8e65c4b8993770b84;p=thirdparty%2Fkrb5.git Avoid assertion failure in error_message r17942 added a call to get_thread_buffer in the first part of error_message, prior to the call to com_err_initialize. This can cause an assertion failure from k5_getspecific if error_message is called on a system error before any other com_err functions are called. Move the initialization call earlier to prevent this. ticket: 7822 (new) target_version: 1.12.2 tags: pullup --- diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c index 50ede704d7..fb72396ce2 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -121,6 +121,9 @@ error_message(long code) char *cp, *cp1; const struct error_table *table; + if (CALL_INIT_FUNCTION(com_err_initialize)) + return 0; + l_offset = (unsigned long)code & ((1<next) {