From: Kevin Bowling <kevin.bowling@kev009.com>
To: musl@lists.openwall.com
Subject: [PATCH] Return rv if memory is not 'calloc'ed in getgrent_a
Date: Fri, 1 May 2015 05:17:37 -0700 [thread overview]
Message-ID: <CAK7dMtAipG-sqPP6s3M4OyCTm57f4WWGN7a3mga9wHx5OCKLug@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
From 714875b1a614c4ac3b7a04a9d419b7f57d28e336 Mon Sep 17 00:00:00 2001
From: Kevin Bowling <kevin.bowling@kev009.com>
Date: Fri, 1 May 2015 05:11:12 -0700
Subject: [PATCH] Return rv if memory is not 'calloc'ed in getgrent_a
---
src/passwd/getgrent_a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/passwd/getgrent_a.c b/src/passwd/getgrent_a.c
index ecd2f2e..80fbc42 100644
--- a/src/passwd/getgrent_a.c
+++ b/src/passwd/getgrent_a.c
@@ -48,7 +48,7 @@ int __getgrent_a(FILE *f, struct group *gr, char **line,
size_t *size, char ***m
rv = errno;
free(*line);
*line = 0;
- return 0;
+ return rv;
}
if (*mems) {
mem[0][0] = mems;
--
2.3.7
[-- Attachment #2: Type: text/html, Size: 983 bytes --]
next reply other threads:[~2015-05-01 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 12:17 Kevin Bowling [this message]
2015-05-01 15:50 ` Rich Felker
2015-05-01 16:34 ` Rich Felker
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=CAK7dMtAipG-sqPP6s3M4OyCTm57f4WWGN7a3mga9wHx5OCKLug@mail.gmail.com \
--to=kevin.bowling@kev009.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).