public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nscd/31679] nscd: netgroup cache may terminate daemon on memory allocation failure
Date: Wed, 24 Apr 2024 20:29:59 +0000 [thread overview]
Message-ID: <bug-31679-131-jlbEAFr0c1@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31679-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=31679
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Carlos O'Donell from comment #1)
> [carlos@athas nscd]$ grep 'xmalloc' *
> Makefile:# To find xmalloc.c
> Makefile: xmalloc xstrdup aicache initgrcache res_hconf \
> connections.c: dbs[cnt].head = xmalloc (sizeof (struct
> database_pers_head)
> connections.c: dbs[cnt].data = xmalloc (dbs[cnt].head->data_size);
> connections.c: struct pollfd *conns = (struct pollfd *) xmalloc (nconns
> connections.c: server_groups = (gid_t *) xmalloc (server_ngroups * sizeof
> (gid_t));
> mem.c: he = xmalloc (memory_needed);
> mem.c:#define obstack_chunk_alloc xmalloc
> netgroupcache.c: buffer = xmalloc (buflen);
> nscd.h:#include <programs/xmalloc.h>
> [carlos@athas nscd]$ grep 'xrealloc' *
> netgroupcache.c: char *newbuf = xrealloc (buffer, buflen);
> netgroupcache.c: *tofreep = buffer = xrealloc (buffer, buflen);
>
> Yes, we should not be doing this anywhere, we should check the result and
> handle the OOM gracefully.
I should note that this bug is only about the netgroupcache.c usage.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2024-04-24 20:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 8:32 [Bug nscd/31679] New: " fweimer at redhat dot com
2024-04-24 8:32 ` [Bug nscd/31679] " fweimer at redhat dot com
2024-04-24 20:25 ` carlos at redhat dot com
2024-04-24 20:29 ` carlos at redhat dot com [this message]
2024-04-24 20:36 ` carlos at redhat dot com
2024-04-24 20:44 ` fweimer at redhat dot com
2024-04-25 13:32 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:35 ` fweimer at redhat dot com
2024-04-25 13:39 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:40 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:42 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:47 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:52 ` cvs-commit at gcc dot gnu.org
2024-04-25 13:53 ` sam at gentoo dot org
2024-04-25 13:55 ` cvs-commit at gcc dot gnu.org
2024-04-25 14:10 ` cvs-commit at gcc dot gnu.org
2024-04-25 14:12 ` cvs-commit at gcc dot gnu.org
2024-04-25 14:13 ` cvs-commit at gcc dot gnu.org
2024-04-25 21:00 ` carnil at debian dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-31679-131-jlbEAFr0c1@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).