public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28395] New: result.val is aligned  malloc pointer,  may not be check NULL in allocate_and_init()
@ 2021-09-29  4:00 wangxuszcn at foxmail dot com
  2021-09-29  7:38 ` [Bug dynamic-link/28395] " schwab@linux-m68k.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: wangxuszcn at foxmail dot com @ 2021-09-29  4:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28395

            Bug ID: 28395
           Summary: result.val is aligned  malloc pointer, may not be
                    check NULL in allocate_and_init()
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: wangxuszcn at foxmail dot com
  Target Milestone: ---

diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 34d6f34..1b7d38a 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -606,7 +609,7 @@ allocate_and_init (struct link_map *map)
 {
   struct dtv_pointer result = allocate_dtv_entry
     (map->l_tls_align, map->l_tls_blocksize);
-  if (result.val == NULL)
+  /*result.val is aligned  malloc pointer, using to_free instead.*/
+  if (result.to_free == NULL)
     oom ();

   /* Initialize the memory.  */

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-11  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  4:00 [Bug dynamic-link/28395] New: result.val is aligned malloc pointer, may not be check NULL in allocate_and_init() wangxuszcn at foxmail dot com
2021-09-29  7:38 ` [Bug dynamic-link/28395] " schwab@linux-m68k.org
2021-09-30  4:25 ` wangxuszcn at foxmail dot com
2021-09-30 17:14 ` fweimer at redhat dot com
2024-01-11  8:56 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).