com_err: make error_table_name() thread-safe

This commit is contained in:
Nicolas Williams
2020-03-03 15:28:54 -06:00
parent 8d19f3f47f
commit 5eade227ce

View File

@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <string.h>
#include <roken.h>
#include <heim_threads.h>
#include "com_err.h"
struct et_list *_et_list = NULL;
@@ -132,7 +133,7 @@ reset_com_err_hook (void)
static const char char_set[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
static char buf[6];
static HEIMDAL_THREAD_LOCAL char buf[6];
KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL
error_table_name(int num)