diff options
author | Jeffrey Altman <jaltman@secure-endpoints.com> | 2007-10-01 20:09:55 +0000 |
---|---|---|
committer | Jeffrey Altman <jaltman@secure-endpoints.com> | 2007-10-01 20:09:55 +0000 |
commit | 72a6d7f1585125e05a39eb57a95bf779fd2c160e (patch) | |
tree | 6843552c67635c8671b29934f676a00d4556d279 /src | |
parent | 74b0ce13640ce7a31f24814062eb3e210ff8487e (diff) | |
download | krb5-72a6d7f1585125e05a39eb57a95bf779fd2c160e.tar.gz krb5-72a6d7f1585125e05a39eb57a95bf779fd2c160e.tar.xz krb5-72a6d7f1585125e05a39eb57a95bf779fd2c160e.zip |
remove error tables by pointer
On Windows, it is possible for the same DLL to be loaded
into a process multiple times as separate instances. Each
time a DLL is loaded it registers its error tables at different
locations in the process address space. Removing the tables
by base instead of pointer value can result in the error table
list pointing at invalid memory.
ticket: new
tags: pullup
target_version: 1.6.3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20040 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/util/et/error_message.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c index 62be6a6e7f..897b7a24ca 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -338,17 +338,17 @@ remove_error_table(const struct error_table * et) if (merr) return merr; - /* Remove the first occurrance we can find. Prefer dynamic + /* Remove the entry that matches the error table instance. Prefer dynamic entries, but if there are none, check for a static one too. */ for (del = &et_list_dynamic; *del; del = &(*del)->next) - if ((*del)->table->base == et->base) { + if ((*del)->table == et) { /*@only@*/ struct dynamic_et_list *old = *del; *del = old->next; free (old); return k5_mutex_unlock(&et_list_lock); } for (el = &_et_list; *el; el = &(*el)->next) - if ((*el)->table != NULL && (*el)->table->base == et->base) { + if ((*el)->table == et) { struct et_list *old = *el; *el = old->next; old->next = NULL; |