mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
* posix/wordexp.c (w_addword): Free word if realloc fails and it
was allocated here. [Coverity CID 219] * posix/getconf.c (print_all): Free confstr data after printing. [Coverity CID 218] * sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if list allocation fails. [Coverity CID 215] * nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition. [Coverity CID 213] * argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if string is NULL. [Coverity CID 212] * argp/Makefile: Add rules to build and run bug-argp1. * argp/bug-argp1.c: New file. * io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find end of string. * stdlib/canonicalize.c (__realpath): Likewise. * locale/programs/ld-time.c (time_finish): Don't dereference NULL pointer. [Coverity CID 206] * elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map in statically linked code. * elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in statically built code, be prepared to have no link map. [Coverity CID 205] * argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in dgettext calls. [Coverity CID 204] * argp/argp-help.c (struct uparams): Remove valid member. Change the one user. (uparam_names): Reduce size. Avoid relative relocations. Moved to read-only segment. (fill_in_uparams): Update for new layout. * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be assumed to always be != NULL. [Coverity CID 202] * argp/argp-help.c (hol_entry_help): Remove some dead code [Coverity CID 200]. * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize away a few more unconditional yperr2nss calls. (_nss_nis_getservbyname_r): Likewise.
This commit is contained in:
15
elf/dl-dst.h
15
elf/dl-dst.h
@@ -1,5 +1,5 @@
|
||||
/* Handling of dynamic sring tokens.
|
||||
Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -50,6 +50,7 @@
|
||||
\
|
||||
First get the origin string if it is not available yet. \
|
||||
This can only happen for the map of the executable. */ \
|
||||
DL_DST_REQ_STATIC \
|
||||
if ((l)->l_origin == NULL) \
|
||||
{ \
|
||||
assert ((l)->l_name[0] == '\0'); \
|
||||
@@ -66,6 +67,18 @@
|
||||
\
|
||||
__len; })
|
||||
|
||||
#ifdef SHARED
|
||||
# define DL_DST_REQ_STATIC /* nothing */
|
||||
#else
|
||||
# define DL_DST_REQ_STATIC \
|
||||
if ((l) == NULL) \
|
||||
{ \
|
||||
const char *origin = _dl_get_origin (); \
|
||||
origin_len = (origin && origin != (char *) -1 ? strlen (origin) : 0); \
|
||||
} \
|
||||
else
|
||||
#endif
|
||||
|
||||
#ifndef IS_IN_rtld
|
||||
# define _dl_get_origin GLRO(dl_get_origin)
|
||||
# define _dl_dst_substitute GLRO(dl_dst_substitute)
|
||||
|
||||
Reference in New Issue
Block a user