This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/22238] NULL pointer dereference in dlopen on out-of-memory


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

--- Comment #7 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #3)
> decompose_rpath has this:
> 
>   fillin_rpath (copy, result, ":", 0, what, where, l);
> 
>   /* Free the copied RPATH string.  `fillin_rpath' make own copies if
>      necessary.  */
>   free (copy);
> 
> Other callers of fillin_rpath also have local allocations that they need to
> free.
> 
> So we can throw from from fillin_rpath without introducing a memory leak.  I
> expect it will be easier to make fillin_rpath to return an error code than
> to change the callers to catch and reraise the exception.

I didn't notice that in my review. Good catch.

In which case we need to clean this up even more, but not much, there aren't
many users of fillin_rpath.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]