From: ebiederm@xmission.com (Eric W. Biederman)
To: Simon Horman <horms@verge.net.au>
Cc: Kexec Mailing List <kexec@lists.infradead.org>
Subject: [PATCH 1/3] Refix concat_cmdline
Date: Thu, 11 Mar 2010 00:20:48 -0800 [thread overview]
Message-ID: <m1fx47b76n.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <m1k4tjb7d1.fsf@fess.ebiederm.org> (Eric W. Biederman's message of "Thu\, 11 Mar 2010 00\:16\:58 -0800")
When removing the potential leak the logic was flipped which
mean we never reached the case for handling when both parameters
were set.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
---
kexec/kexec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/kexec.c b/kexec/kexec.c
index d282ade..43d0189 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1007,9 +1007,9 @@ char *concat_cmdline(const char *base, const char *append)
char *cmdline;
if (!base && !append)
return NULL;
- if (append)
+ if (append && !base)
return xstrdup(append);
- if (base)
+ if (base && !append)
return xstrdup(base);
cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1);
strcpy(cmdline, base);
--
1.6.6.1
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2010-03-11 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 8:16 [PATCH 0/3] Getting biarch support Eric W. Biederman
2010-03-11 8:20 ` Eric W. Biederman [this message]
2010-03-11 8:20 ` Simon Horman
2010-03-11 8:21 ` [PATCH 2/3] kexec: Figure out our native architecture before load Eric W. Biederman
2010-03-11 8:22 ` [PATCH 3/3] x86: Fix biarch crashdump setup Eric W. Biederman
2010-03-11 8:22 ` [PATCH 0/3] Getting biarch support Bernhard Walle
2010-03-11 8:35 ` Eric W. Biederman
2010-03-11 8:48 ` Simon Horman
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=m1fx47b76n.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.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