]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle NULL return from htab_find_slot()
authorMarcus Shawcroft <marcus.shawcroft@linaro.org>
Wed, 13 Nov 2013 12:37:41 +0000 (12:37 +0000)
committerMarcus Shawcroft <marcus.shawcroft@linaro.org>
Wed, 13 Nov 2013 12:37:41 +0000 (12:37 +0000)
ChangeLog
elf/tlsdeschtab.h

index ac141b84225cb39d03b761f5ff6c5d931b87e59c..b129b320b2007612ca49894ed3a195fe5be47621 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-13  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
+
+       * elf/tlsdeschtab.h (_dl_make_tlsdesc_dynamic): Handle failure
+       of htab_find_slot().
+
 2013-11-11  David S. Miller  <davem@davemloft.net>
 
        [BZ #16150]
index 155f4fdd9bcef29eb9b51f8ee9d4bc4e0a761256..8ce8249b920ba2ce52640850b4ab6e7ac003d4ed 100644 (file)
@@ -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;