From: Marcus Shawcroft Date: Wed, 13 Nov 2013 12:37:41 +0000 (+0000) Subject: Handle NULL return from htab_find_slot() X-Git-Tag: glibc-2.19~525 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a615be46758fd857872e3e2a12f1fd296bee1a7c;p=thirdparty%2Fglibc.git Handle NULL return from htab_find_slot() --- diff --git a/ChangeLog b/ChangeLog index ac141b84225..b129b320b20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-13 Marcus Shawcroft + + * elf/tlsdeschtab.h (_dl_make_tlsdesc_dynamic): Handle failure + of htab_find_slot(). + 2013-11-11 David S. Miller [BZ #16150] diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h index 155f4fdd9bc..8ce8249b920 100644 --- a/elf/tlsdeschtab.h +++ b/elf/tlsdeschtab.h @@ -102,6 +102,12 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset) test.tlsinfo.ti_module = map->l_tls_modid; test.tlsinfo.ti_offset = ti_offset; entry = htab_find_slot (ht, &test, 1, hash_tlsdesc, eq_tlsdesc); + if (! entry) + { + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + return 0; + } + if (*entry) { td = *entry;