From 322861e8b62dbca030a66f9ab37e6688b223c65f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Jun 2004 22:18:24 +0000 Subject: Update. 2004-05-07 Dmitry V. Levin * argp/argp-help.c (__argp_error, __argp_failure): Check result of __asprintf call and don't use string if it failed. * stdio-common/psignal.c (psignal): Likewise. * locale/programs/localedef.c (more_help): Likewise. * resolv/res_hconf.c (arg_service_list, arg_trimdomain_list, arg_bool, parse_line): Check result of __asprintf calls and don't use string if they failed. * sunrpc/svc_simple.c (registerrpc, universal): Likewise. * elf/ldconfig.c (parse_conf_include): Check result of __asprintf call and exit if it failed. --- elf/ldconfig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 222d862bd2..bf103c7269 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -1034,7 +1034,9 @@ parse_conf_include (const char *config_file, unsigned int lineno, char *copy = NULL; if (pattern[0] != '/' && strchr (config_file, '/') != NULL) { - asprintf (©, "%s/%s", dirname (strdupa (config_file)), pattern); + if (asprintf (©, "%s/%s", dirname (strdupa (config_file)), + pattern) < 0) + error (EXIT_FAILURE, 0, _("memory exhausted")); pattern = copy; } -- cgit v1.2.3